@skj1724/oh-my-opencode 3.11.8 → 3.17.4

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 (366) hide show
  1. package/README.ja.md +8 -4
  2. package/README.ko.md +8 -4
  3. package/README.md +20 -10
  4. package/README.ru.md +8 -4
  5. package/README.zh-cn.md +8 -4
  6. package/bin/oh-my-opencode.js +11 -0
  7. package/bin/platform.js +13 -13
  8. package/bin/platform.test.ts +15 -0
  9. package/dist/agents/atlas/agent.d.ts +1 -1
  10. package/dist/agents/atlas/default-prompt-sections.d.ts +6 -0
  11. package/dist/agents/atlas/default.d.ts +0 -9
  12. package/dist/agents/atlas/gemini-prompt-sections.d.ts +6 -0
  13. package/dist/agents/atlas/gpt-prompt-sections.d.ts +6 -0
  14. package/dist/agents/atlas/gpt.d.ts +0 -9
  15. package/dist/agents/atlas/shared-prompt.d.ts +9 -0
  16. package/dist/agents/dynamic-agent-category-skills-guide.d.ts +2 -0
  17. package/dist/agents/dynamic-agent-core-sections.d.ts +17 -0
  18. package/dist/agents/dynamic-agent-policy-sections.d.ts +6 -0
  19. package/dist/agents/dynamic-agent-prompt-builder.d.ts +5 -35
  20. package/dist/agents/dynamic-agent-prompt-types.d.ts +20 -0
  21. package/dist/agents/dynamic-agent-tool-categorization.d.ts +3 -0
  22. package/dist/agents/gpt-apply-patch-guard.d.ts +2 -0
  23. package/dist/agents/hephaestus/agent.d.ts +1 -1
  24. package/dist/agents/hephaestus/gpt-5-3-codex.d.ts +1 -2
  25. package/dist/agents/hephaestus/gpt-5-4.d.ts +22 -1
  26. package/dist/agents/hephaestus/gpt.d.ts +1 -1
  27. package/dist/agents/metis.d.ts +9 -9
  28. package/dist/agents/momus.d.ts +2 -2
  29. package/dist/agents/prometheus/behavioral-summary.d.ts +1 -1
  30. package/dist/agents/prometheus/identity-constraints.d.ts +4 -3
  31. package/dist/agents/prometheus/interview-mode.d.ts +3 -3
  32. package/dist/agents/prometheus/plan-generation.d.ts +4 -4
  33. package/dist/agents/prometheus/plan-template.d.ts +1 -1
  34. package/dist/agents/sisyphus/default.d.ts +2 -2
  35. package/dist/agents/sisyphus/gemini.d.ts +10 -10
  36. package/dist/agents/sisyphus/gpt-5-4.d.ts +18 -18
  37. package/dist/agents/sisyphus/index.d.ts +1 -1
  38. package/dist/agents/sisyphus.d.ts +1 -1
  39. package/dist/agents/types.d.ts +1 -0
  40. package/dist/cli/config-manager/backup-config.d.ts +6 -0
  41. package/dist/cli/config-manager/version-compatibility.d.ts +9 -0
  42. package/dist/cli/config-manager.d.ts +4 -0
  43. package/dist/cli/doctor/checks/system.d.ts +15 -2
  44. package/dist/cli/doctor/constants.d.ts +1 -1
  45. package/dist/cli/doctor/spawn-with-timeout.d.ts +8 -0
  46. package/dist/cli/index.js +27570 -18945
  47. package/dist/cli/install-validators.d.ts +1 -0
  48. package/dist/cli/mcp-oauth/login.d.ts +6 -1
  49. package/dist/cli/minimum-opencode-version.d.ts +1 -0
  50. package/dist/cli/model-fallback-types.d.ts +4 -0
  51. package/dist/cli/provider-model-id-transform.d.ts +1 -1
  52. package/dist/cli/run/continuation-state.d.ts +2 -1
  53. package/dist/cli/run/event-state.d.ts +0 -2
  54. package/dist/cli/run/types.d.ts +0 -1
  55. package/dist/cli/types.d.ts +4 -0
  56. package/dist/config/schema/agent-definitions.d.ts +3 -0
  57. package/dist/config/schema/agent-names.d.ts +2 -0
  58. package/dist/config/schema/agent-overrides.d.ts +330 -15
  59. package/dist/config/schema/background-task.d.ts +2 -1
  60. package/dist/config/schema/categories.d.ts +44 -2
  61. package/dist/config/schema/commands.d.ts +1 -0
  62. package/dist/config/schema/experimental.d.ts +1 -0
  63. package/dist/config/schema/fallback-models.d.ts +67 -1
  64. package/dist/config/schema/hooks.d.ts +3 -0
  65. package/dist/config/schema/oh-my-opencode-config.d.ts +345 -17
  66. package/dist/config/schema/sisyphus-agent.d.ts +1 -0
  67. package/dist/config/schema/tmux.d.ts +11 -0
  68. package/dist/create-hooks.d.ts +8 -0
  69. package/dist/create-managers.d.ts +16 -0
  70. package/dist/create-runtime-tmux-config.d.ts +10 -0
  71. package/dist/create-tools.d.ts +3 -2
  72. package/dist/features/background-agent/abort-with-timeout.d.ts +2 -0
  73. package/dist/features/background-agent/background-task-notification-template.d.ts +10 -4
  74. package/dist/features/background-agent/compaction-aware-message-resolver.d.ts +5 -2
  75. package/dist/features/background-agent/constants.d.ts +1 -0
  76. package/dist/features/background-agent/fallback-retry-handler.d.ts +1 -1
  77. package/dist/features/background-agent/index.d.ts +2 -0
  78. package/dist/features/background-agent/manager.d.ts +10 -0
  79. package/dist/features/background-agent/process-cleanup.d.ts +1 -1
  80. package/dist/features/background-agent/session-existence.d.ts +3 -0
  81. package/dist/features/background-agent/spawner.d.ts +3 -0
  82. package/dist/features/background-agent/subagent-spawn-limits.d.ts +1 -8
  83. package/dist/features/background-agent/task-poller.d.ts +2 -0
  84. package/dist/features/background-agent/types.d.ts +2 -0
  85. package/dist/features/background-agent/wait-for-task-session.d.ts +17 -0
  86. package/dist/features/boulder-state/storage.d.ts +8 -1
  87. package/dist/features/boulder-state/types.d.ts +1 -0
  88. package/dist/features/builtin-commands/commands.d.ts +5 -1
  89. package/dist/features/builtin-commands/templates/handoff.d.ts +1 -1
  90. package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
  91. package/dist/features/builtin-commands/templates/ralph-loop.d.ts +3 -3
  92. package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -0
  93. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
  94. package/dist/features/builtin-commands/types.d.ts +1 -1
  95. package/dist/features/builtin-skills/skills/ai-slop-remover.d.ts +2 -0
  96. package/dist/features/builtin-skills/skills/git-master-sections/commit-workflow.d.ts +1 -0
  97. package/dist/features/builtin-skills/skills/git-master-sections/history-search-workflow.d.ts +1 -0
  98. package/dist/features/builtin-skills/skills/git-master-sections/overview.d.ts +1 -0
  99. package/dist/features/builtin-skills/skills/git-master-sections/quick-reference.d.ts +1 -0
  100. package/dist/features/builtin-skills/skills/git-master-sections/rebase-workflow.d.ts +1 -0
  101. package/dist/features/builtin-skills/skills/index.d.ts +2 -0
  102. package/dist/features/builtin-skills/skills/playwright-cli.d.ts +1 -1
  103. package/dist/features/builtin-skills/skills/review-work.d.ts +2 -0
  104. package/dist/features/claude-code-agent-loader/agent-definitions-loader.d.ts +3 -0
  105. package/dist/features/claude-code-agent-loader/index.d.ts +3 -0
  106. package/dist/features/claude-code-agent-loader/json-agent-loader.d.ts +2 -0
  107. package/dist/features/claude-code-agent-loader/loader.d.ts +2 -0
  108. package/dist/features/claude-code-agent-loader/opencode-config-agents-reader.d.ts +2 -0
  109. package/dist/features/claude-code-agent-loader/types.d.ts +9 -1
  110. package/dist/features/claude-code-mcp-loader/configure-allowed-env-vars.d.ts +5 -0
  111. package/dist/features/claude-code-mcp-loader/env-expander.d.ts +5 -2
  112. package/dist/features/claude-code-mcp-loader/index.d.ts +1 -0
  113. package/dist/features/claude-code-mcp-loader/scope-filter.d.ts +2 -0
  114. package/dist/features/claude-code-mcp-loader/types.d.ts +8 -4
  115. package/dist/features/claude-code-plugin-loader/discovery.d.ts +2 -1
  116. package/dist/features/claude-code-plugin-loader/loader.d.ts +16 -0
  117. package/dist/features/claude-code-plugin-loader/scope-filter.d.ts +2 -0
  118. package/dist/features/claude-code-plugin-loader/types.d.ts +21 -0
  119. package/dist/features/claude-code-session-state/state.d.ts +3 -0
  120. package/dist/features/context-injector/collector.d.ts +1 -0
  121. package/dist/features/mcp-oauth/provider.d.ts +1 -0
  122. package/dist/features/mcp-oauth/refresh-mutex.d.ts +26 -0
  123. package/dist/features/opencode-skill-loader/async-loader.d.ts +2 -2
  124. package/dist/features/skill-mcp-manager/connection.d.ts +3 -4
  125. package/dist/features/skill-mcp-manager/error-redaction.d.ts +10 -0
  126. package/dist/features/skill-mcp-manager/http-client.d.ts +17 -3
  127. package/dist/features/skill-mcp-manager/manager.d.ts +5 -3
  128. package/dist/features/skill-mcp-manager/oauth-handler.d.ts +12 -4
  129. package/dist/features/skill-mcp-manager/stdio-client.d.ts +16 -3
  130. package/dist/features/skill-mcp-manager/types.d.ts +25 -6
  131. package/dist/features/team-mode/index.d.ts +2 -0
  132. package/dist/features/team-mode/team-worktree/cleanup.d.ts +3 -0
  133. package/dist/features/team-mode/team-worktree/index.d.ts +2 -0
  134. package/dist/features/team-mode/team-worktree/manager.d.ts +15 -0
  135. package/dist/features/team-mode/types.d.ts +210 -0
  136. package/dist/features/tmux-subagent/manager.d.ts +16 -13
  137. package/dist/features/tmux-subagent/polling-manager.d.ts +5 -0
  138. package/dist/features/tmux-subagent/types.d.ts +2 -0
  139. package/dist/features/tool-metadata-store/index.d.ts +7 -0
  140. package/dist/features/tool-metadata-store/publish-tool-metadata.d.ts +9 -0
  141. package/dist/features/tool-metadata-store/recover-tool-metadata.d.ts +3 -0
  142. package/dist/features/tool-metadata-store/resolve-tool-call-id.d.ts +6 -0
  143. package/dist/features/tool-metadata-store/task-metadata-contract.d.ts +10 -0
  144. package/dist/hooks/agent-usage-reminder/constants.d.ts +1 -1
  145. package/dist/hooks/anthropic-context-window-limit-recovery/message-builder.d.ts +4 -1
  146. package/dist/hooks/anthropic-context-window-limit-recovery/recovery-hook.d.ts +10 -0
  147. package/dist/hooks/anthropic-context-window-limit-recovery/recovery-hook.test-support.d.ts +29 -0
  148. package/dist/hooks/anthropic-context-window-limit-recovery/session-timeout-map.d.ts +2 -0
  149. package/dist/hooks/anthropic-context-window-limit-recovery/state.d.ts +2 -0
  150. package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +1 -0
  151. package/dist/hooks/atlas/background-launch-session-tracking.d.ts +11 -0
  152. package/dist/hooks/atlas/boulder-continuation-injector.d.ts +2 -1
  153. package/dist/hooks/atlas/session-last-agent.d.ts +10 -1
  154. package/dist/hooks/atlas/subagent-session-id.d.ts +1 -0
  155. package/dist/hooks/atlas/system-reminder-templates.d.ts +2 -2
  156. package/dist/hooks/atlas/task-context.d.ts +7 -0
  157. package/dist/hooks/atlas/types.d.ts +2 -0
  158. package/dist/hooks/auto-slash-command/executor.d.ts +1 -0
  159. package/dist/hooks/auto-slash-command/hook.d.ts +1 -0
  160. package/dist/hooks/auto-update-checker/checker/sync-package-json.d.ts +1 -1
  161. package/dist/hooks/auto-update-checker/constants.d.ts +19 -3
  162. package/dist/hooks/auto-update-checker/hook/background-update-check.d.ts +29 -1
  163. package/dist/hooks/auto-update-checker/hook.d.ts +22 -1
  164. package/dist/hooks/bash-file-read-guard.d.ts +2 -0
  165. package/dist/hooks/claude-code-hooks/claude-code-hooks-hook.d.ts +1 -0
  166. package/dist/hooks/claude-code-hooks/config-loader.d.ts +1 -0
  167. package/dist/hooks/claude-code-hooks/config.d.ts +1 -0
  168. package/dist/hooks/claude-code-hooks/handlers/session-event-handler.d.ts +3 -1
  169. package/dist/hooks/claude-code-hooks/session-hook-state.d.ts +1 -0
  170. package/dist/hooks/claude-code-hooks/tool-input-cache.d.ts +2 -0
  171. package/dist/hooks/claude-code-hooks/transcript.d.ts +1 -3
  172. package/dist/hooks/comment-checker/cli-runner.d.ts +4 -1
  173. package/dist/hooks/comment-checker/hook.d.ts +1 -0
  174. package/dist/hooks/comment-checker/pending-calls.d.ts +1 -0
  175. package/dist/hooks/directory-agents-injector/hook.d.ts +7 -7
  176. package/dist/hooks/directory-readme-injector/hook.d.ts +7 -7
  177. package/dist/hooks/edit-error-recovery/hook.d.ts +1 -1
  178. package/dist/hooks/index.d.ts +4 -1
  179. package/dist/hooks/json-error-recovery/hook.d.ts +1 -1
  180. package/dist/hooks/keyword-detector/hook.d.ts +2 -1
  181. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +3 -4
  182. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +11 -12
  183. package/dist/hooks/keyword-detector/ultrawork/gpt.d.ts +4 -5
  184. package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +1 -2
  185. package/dist/hooks/legacy-plugin-toast/auto-migrate-runner.d.ts +2 -0
  186. package/dist/hooks/legacy-plugin-toast/auto-migrate.d.ts +7 -0
  187. package/dist/hooks/legacy-plugin-toast/hook.d.ts +18 -0
  188. package/dist/hooks/legacy-plugin-toast/index.d.ts +1 -0
  189. package/dist/hooks/legacy-plugin-toast/plugin-entry-migrator.d.ts +1 -0
  190. package/dist/hooks/model-fallback/chat-message-fallback-handler.d.ts +23 -0
  191. package/dist/hooks/model-fallback/controller-accessor.d.ts +8 -0
  192. package/dist/hooks/model-fallback/fallback-state-controller.d.ts +26 -0
  193. package/dist/hooks/model-fallback/hook.d.ts +21 -16
  194. package/dist/hooks/model-fallback/index.d.ts +2 -0
  195. package/dist/hooks/model-fallback/next-fallback.d.ts +14 -0
  196. package/dist/hooks/preemptive-compaction-trigger.d.ts +13 -0
  197. package/dist/hooks/preemptive-compaction-types.d.ts +53 -0
  198. package/dist/hooks/preemptive-compaction.d.ts +3 -15
  199. package/dist/hooks/ralph-loop/completion-promise-detector-test-input.d.ts +11 -0
  200. package/dist/hooks/ralph-loop/constants.d.ts +1 -0
  201. package/dist/hooks/ralph-loop/oracle-verification-detector.d.ts +8 -0
  202. package/dist/hooks/read-image-resizer/image-resizer.d.ts +3 -1
  203. package/dist/hooks/read-image-resizer/png-fallback-resizer.d.ts +2 -0
  204. package/dist/hooks/rules-injector/constants.d.ts +1 -0
  205. package/dist/hooks/rules-injector/finder.d.ts +1 -1
  206. package/dist/hooks/rules-injector/hook.d.ts +2 -0
  207. package/dist/hooks/rules-injector/injector.d.ts +14 -0
  208. package/dist/hooks/rules-injector/rule-file-finder.d.ts +9 -1
  209. package/dist/hooks/runtime-fallback/auto-retry-signal.d.ts +4 -0
  210. package/dist/hooks/runtime-fallback/error-classifier.d.ts +1 -5
  211. package/dist/hooks/runtime-fallback/fallback-models.d.ts +1 -1
  212. package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +5 -1
  213. package/dist/hooks/session-notification-event-properties.d.ts +5 -0
  214. package/dist/hooks/session-recovery/types.d.ts +2 -0
  215. package/dist/hooks/start-work/context-info-builder.d.ts +12 -0
  216. package/dist/hooks/start-work/start-work-hook.d.ts +6 -0
  217. package/dist/hooks/start-work/worktree-block.d.ts +1 -0
  218. package/dist/hooks/todo-continuation-enforcer/pending-question-detection.d.ts +1 -1
  219. package/dist/hooks/todo-continuation-enforcer/resolve-message-info.d.ts +2 -2
  220. package/dist/hooks/todo-continuation-enforcer/session-state.d.ts +4 -3
  221. package/dist/hooks/todo-continuation-enforcer/token-limit-detection.d.ts +4 -0
  222. package/dist/hooks/todo-continuation-enforcer/types.d.ts +14 -0
  223. package/dist/hooks/todo-description-override/description.d.ts +1 -1
  224. package/dist/hooks/tool-pair-validator/hook.d.ts +28 -0
  225. package/dist/hooks/tool-pair-validator/index.d.ts +1 -0
  226. package/dist/hooks/unstable-agent-babysitter/task-message-analyzer.d.ts +1 -0
  227. package/dist/hooks/unstable-agent-babysitter/unstable-agent-babysitter-hook.d.ts +2 -0
  228. package/dist/hooks/write-existing-file-guard/hook.d.ts +12 -0
  229. package/dist/hooks/write-existing-file-guard/session-read-permissions.d.ts +3 -0
  230. package/dist/hooks/write-existing-file-guard/tool-execute-before-handler.d.ts +15 -0
  231. package/dist/index.d.ts +3 -3
  232. package/dist/index.js +84801 -95412
  233. package/dist/mcp/websearch.d.ts +2 -2
  234. package/dist/oh-my-opencode.schema.json +1059 -8
  235. package/dist/openclaw/config.d.ts +1 -1
  236. package/dist/openclaw/dispatcher.d.ts +9 -13
  237. package/dist/openclaw/gateway-url-validation.d.ts +1 -0
  238. package/dist/openclaw/reply-listener-discord.d.ts +4 -0
  239. package/dist/openclaw/reply-listener-injection.d.ts +10 -0
  240. package/dist/openclaw/reply-listener-log.d.ts +2 -0
  241. package/dist/openclaw/reply-listener-paths.d.ts +7 -0
  242. package/dist/openclaw/reply-listener-process.d.ts +4 -0
  243. package/dist/openclaw/reply-listener-spawn.d.ts +5 -0
  244. package/dist/openclaw/reply-listener-startup.d.ts +12 -0
  245. package/dist/openclaw/reply-listener-state.d.ts +29 -0
  246. package/dist/openclaw/reply-listener-telegram.d.ts +4 -0
  247. package/dist/openclaw/reply-listener.d.ts +5 -18
  248. package/dist/openclaw/runtime-dispatch.d.ts +17 -0
  249. package/dist/openclaw/types.d.ts +4 -0
  250. package/dist/plugin/chat-params.d.ts +1 -0
  251. package/dist/plugin/command-execute-before.d.ts +19 -0
  252. package/dist/plugin/hooks/create-core-hooks.d.ts +5 -0
  253. package/dist/plugin/hooks/create-session-hooks.d.ts +4 -1
  254. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
  255. package/dist/plugin/hooks/create-transform-hooks.d.ts +4 -1
  256. package/dist/plugin/tool-registry.d.ts +26 -1
  257. package/dist/plugin/types.d.ts +1 -0
  258. package/dist/plugin-handlers/agent-priority-order.d.ts +11 -0
  259. package/dist/shared/agent-display-names.d.ts +23 -2
  260. package/dist/shared/agent-tool-restrictions.d.ts +0 -5
  261. package/dist/shared/archive-entry-validator.d.ts +6 -0
  262. package/dist/shared/background-output-consumption.d.ts +5 -0
  263. package/dist/shared/compaction-marker.d.ts +13 -0
  264. package/dist/shared/connected-providers-cache.d.ts +2 -1
  265. package/dist/shared/contains-path.d.ts +2 -0
  266. package/dist/shared/external-plugin-detector.d.ts +14 -0
  267. package/dist/shared/index.d.ts +9 -0
  268. package/dist/shared/internal-initiator-marker.d.ts +1 -0
  269. package/dist/shared/is-abort-error.d.ts +1 -0
  270. package/dist/shared/json-file-cache-store.d.ts +16 -0
  271. package/dist/shared/jsonc-parser.d.ts +1 -0
  272. package/dist/shared/legacy-plugin-warning.d.ts +7 -0
  273. package/dist/shared/load-opencode-plugins.d.ts +1 -0
  274. package/dist/shared/log-legacy-plugin-startup-warning.d.ts +10 -0
  275. package/dist/shared/migrate-legacy-config-file.d.ts +1 -0
  276. package/dist/shared/migrate-legacy-plugin-entry.d.ts +1 -0
  277. package/dist/shared/migration/migrations-sidecar.d.ts +41 -0
  278. package/dist/shared/model-capabilities/bundled-snapshot.d.ts +2 -0
  279. package/dist/shared/model-capabilities/get-model-capabilities.d.ts +2 -0
  280. package/dist/shared/model-capabilities/index.d.ts +3 -0
  281. package/dist/shared/model-capabilities/runtime-model-readers.d.ts +11 -0
  282. package/dist/shared/{model-capabilities.d.ts → model-capabilities/types.d.ts} +35 -32
  283. package/dist/shared/model-suggestion-retry.d.ts +0 -9
  284. package/dist/shared/opencode-provider-auth.d.ts +3 -0
  285. package/dist/shared/parse-tools-config.d.ts +6 -0
  286. package/dist/shared/permission-compat.d.ts +1 -1
  287. package/dist/shared/plugin-entry-migrator.d.ts +3 -0
  288. package/dist/shared/plugin-identity.d.ts +6 -3
  289. package/dist/shared/posthog-activity-state.d.ts +8 -0
  290. package/dist/shared/posthog.d.ts +14 -0
  291. package/dist/shared/resolve-agent-definition-paths.d.ts +1 -0
  292. package/dist/shared/ripgrep-cli.d.ts +8 -0
  293. package/dist/shared/session-category-registry.d.ts +0 -24
  294. package/dist/shared/session-cursor.d.ts +6 -0
  295. package/dist/shared/session-prompt-params-state.d.ts +1 -0
  296. package/dist/shared/shell-env.d.ts +6 -2
  297. package/dist/shared/skill-path-resolver.d.ts +0 -8
  298. package/dist/shared/task-system-enabled.d.ts +6 -0
  299. package/dist/shared/tmux/tmux-utils/server-health.d.ts +1 -0
  300. package/dist/shared/tmux/tmux-utils/session-spawn.d.ts +3 -0
  301. package/dist/shared/tmux/tmux-utils/window-spawn.d.ts +3 -0
  302. package/dist/shared/tmux/tmux-utils.d.ts +3 -1
  303. package/dist/shared/write-file-atomically.d.ts +1 -0
  304. package/dist/shared/zip-entry-listing/powershell-zip-entry-listing.d.ts +4 -0
  305. package/dist/shared/zip-entry-listing/python-zip-entry-listing.d.ts +3 -0
  306. package/dist/shared/zip-entry-listing/read-zip-symlink-target.d.ts +1 -0
  307. package/dist/shared/zip-entry-listing/tar-zip-entry-listing.d.ts +3 -0
  308. package/dist/shared/zip-entry-listing/zipinfo-zip-entry-listing.d.ts +4 -0
  309. package/dist/shared/zip-entry-listing.d.ts +4 -0
  310. package/dist/testing/module-mock-lifecycle.d.ts +21 -0
  311. package/dist/tools/background-task/constants.d.ts +3 -3
  312. package/dist/tools/call-omo-agent/agent-resolver.d.ts +17 -0
  313. package/dist/tools/call-omo-agent/background-executor.d.ts +2 -1
  314. package/dist/tools/call-omo-agent/constants.d.ts +1 -1
  315. package/dist/tools/call-omo-agent/sync-executor.d.ts +4 -4
  316. package/dist/tools/call-omo-agent/tools.d.ts +2 -1
  317. package/dist/tools/delegate-task/anthropic-categories.d.ts +2 -0
  318. package/dist/tools/delegate-task/builtin-categories.d.ts +4 -0
  319. package/dist/tools/delegate-task/builtin-category-definition.d.ts +7 -0
  320. package/dist/tools/delegate-task/constants.d.ts +1 -12
  321. package/dist/tools/delegate-task/delegated-model-config.d.ts +3 -0
  322. package/dist/tools/delegate-task/executor-types.d.ts +4 -1
  323. package/dist/tools/delegate-task/fallback-entry-resolution.d.ts +12 -0
  324. package/dist/tools/delegate-task/fallback-entry-settings.d.ts +7 -0
  325. package/dist/tools/delegate-task/google-categories.d.ts +2 -0
  326. package/dist/tools/delegate-task/kimi-categories.d.ts +2 -0
  327. package/dist/tools/delegate-task/openai-categories.d.ts +2 -0
  328. package/dist/tools/delegate-task/prompt-builder.d.ts +1 -1
  329. package/dist/tools/delegate-task/resolve-metadata-model.d.ts +8 -0
  330. package/dist/tools/delegate-task/subagent-discovery.d.ts +15 -0
  331. package/dist/tools/delegate-task/sync-continuation.d.ts +2 -2
  332. package/dist/tools/delegate-task/sync-prompt-sender.d.ts +2 -0
  333. package/dist/tools/delegate-task/sync-task-fallback.d.ts +12 -0
  334. package/dist/tools/delegate-task/task-id.d.ts +2 -0
  335. package/dist/tools/delegate-task/tool-argument-preparation.d.ts +2 -0
  336. package/dist/tools/delegate-task/tool-description.d.ts +9 -0
  337. package/dist/tools/delegate-task/types.d.ts +5 -2
  338. package/dist/tools/glob/constants.d.ts +1 -1
  339. package/dist/tools/grep/cli.d.ts +3 -2
  340. package/dist/tools/grep/constants.d.ts +0 -9
  341. package/dist/tools/hashline-edit/tool-description.d.ts +1 -1
  342. package/dist/tools/look-at/constants.d.ts +1 -1
  343. package/dist/tools/look-at/look-at-input-preparer.d.ts +22 -0
  344. package/dist/tools/look-at/look-at-prompt.d.ts +2 -0
  345. package/dist/tools/look-at/look-at-session-runner.d.ts +12 -0
  346. package/dist/tools/lsp/infer-extension.d.ts +1 -0
  347. package/dist/tools/session-manager/file-storage.d.ts +8 -0
  348. package/dist/tools/session-manager/sdk-storage.d.ts +8 -0
  349. package/dist/tools/session-manager/sdk-unavailable.d.ts +1 -0
  350. package/dist/tools/session-manager/storage.d.ts +1 -1
  351. package/dist/tools/session-manager/tools.d.ts +19 -1
  352. package/dist/tools/skill/constants.d.ts +2 -2
  353. package/dist/tools/skill/description-formatter.d.ts +3 -0
  354. package/dist/tools/skill/mcp-capability-formatter.d.ts +3 -0
  355. package/dist/tools/skill/native-skills.d.ts +12 -0
  356. package/dist/tools/skill/scope-priority.d.ts +4 -0
  357. package/dist/tools/skill/skill-body.d.ts +2 -0
  358. package/dist/tools/skill/skill-matcher.d.ts +5 -0
  359. package/dist/tools/skill/types.d.ts +30 -2
  360. package/dist/tools/skill-mcp/parse-skill-mcp-arguments.d.ts +1 -0
  361. package/dist/tools/skill-mcp/tools.d.ts +1 -1
  362. package/package.json +26 -25
  363. package/postinstall.mjs +75 -1
  364. package/dist/hooks/openclaw.d.ts +0 -11
  365. package/dist/plugin-dispose.d.ts +0 -10
  366. /package/dist/{tools/delegate-task → shared}/model-string-parser.d.ts +0 -0
@@ -2,6 +2,7 @@ import type { AvailableSkill } from "./agents/dynamic-agent-prompt-builder";
2
2
  import type { HookName, OhMyOpenCodeConfig } from "./config";
3
3
  import type { LoadedSkill } from "./features/opencode-skill-loader/types";
4
4
  import type { BackgroundManager } from "./features/background-agent";
5
+ import type { ModelFallbackControllerAccessor } from "./hooks/model-fallback";
5
6
  import type { PluginContext } from "./plugin/types";
6
7
  import type { ModelCacheState } from "./plugin-state";
7
8
  export type CreatedHooks = ReturnType<typeof createHooks>;
@@ -9,9 +10,12 @@ type DisposableHook = {
9
10
  dispose?: () => void;
10
11
  } | null | undefined;
11
12
  export type DisposableCreatedHooks = {
13
+ claudeCodeHooks?: DisposableHook;
14
+ commentChecker?: DisposableHook;
12
15
  runtimeFallback?: DisposableHook;
13
16
  todoContinuationEnforcer?: DisposableHook;
14
17
  autoSlashCommand?: DisposableHook;
18
+ anthropicContextWindowLimitRecovery?: DisposableHook;
15
19
  };
16
20
  export declare function disposeCreatedHooks(hooks: DisposableCreatedHooks): void;
17
21
  export declare function createHooks(args: {
@@ -19,6 +23,7 @@ export declare function createHooks(args: {
19
23
  pluginConfig: OhMyOpenCodeConfig;
20
24
  modelCacheState: ModelCacheState;
21
25
  backgroundManager: BackgroundManager;
26
+ modelFallbackControllerAccessor?: ModelFallbackControllerAccessor;
22
27
  isHookEnabled: (hookName: HookName) => boolean;
23
28
  safeHookEnabled: boolean;
24
29
  mergedSkills: LoadedSkill[];
@@ -38,6 +43,7 @@ export declare function createHooks(args: {
38
43
  keywordDetector: ReturnType<typeof import("./hooks").createKeywordDetectorHook> | null;
39
44
  contextInjectorMessagesTransform: ReturnType<typeof import("./features/context-injector").createContextInjectorMessagesTransformHook>;
40
45
  thinkingBlockValidator: ReturnType<typeof import("./hooks").createThinkingBlockValidatorHook> | null;
46
+ toolPairValidator: ReturnType<typeof import("./hooks").createToolPairValidatorHook> | null;
41
47
  commentChecker: ReturnType<typeof import("./hooks").createCommentCheckerHooks> | null;
42
48
  toolOutputTruncator: ReturnType<typeof import("./hooks").createToolOutputTruncatorHook> | null;
43
49
  directoryAgentsInjector: ReturnType<typeof import("./hooks").createDirectoryAgentsInjectorHook> | null;
@@ -46,6 +52,7 @@ export declare function createHooks(args: {
46
52
  rulesInjector: ReturnType<typeof import("./hooks").createRulesInjectorHook> | null;
47
53
  tasksTodowriteDisabler: ReturnType<typeof import("./hooks").createTasksTodowriteDisablerHook> | null;
48
54
  writeExistingFileGuard: ReturnType<typeof import("./hooks").createWriteExistingFileGuardHook> | null;
55
+ bashFileReadGuard: ReturnType<typeof import("./hooks").createBashFileReadGuardHook> | null;
49
56
  hashlineReadEnhancer: ReturnType<typeof import("./hooks").createHashlineReadEnhancerHook> | null;
50
57
  jsonErrorRecovery: ReturnType<typeof import("./hooks").createJsonErrorRecoveryHook> | null;
51
58
  readImageResizer: ReturnType<typeof import("./hooks").createReadImageResizerHook> | null;
@@ -74,5 +81,6 @@ export declare function createHooks(args: {
74
81
  taskResumeInfo: ReturnType<typeof import("./hooks").createTaskResumeInfoHook> | null;
75
82
  anthropicEffort: ReturnType<typeof import("./hooks/anthropic-effort").createAnthropicEffortHook> | null;
76
83
  runtimeFallback: ReturnType<typeof import("./hooks").createRuntimeFallbackHook> | null;
84
+ legacyPluginToast: ReturnType<typeof import("./hooks").createLegacyPluginToastHook> | null;
77
85
  };
78
86
  export {};
@@ -3,13 +3,27 @@ import type { ModelCacheState } from "./plugin-state";
3
3
  import type { PluginContext, TmuxConfig } from "./plugin/types";
4
4
  import { BackgroundManager } from "./features/background-agent";
5
5
  import { SkillMcpManager } from "./features/skill-mcp-manager";
6
+ import { initTaskToastManager } from "./features/task-toast-manager";
6
7
  import { TmuxSessionManager } from "./features/tmux-subagent";
8
+ import { registerManagerForCleanup } from "./features/background-agent/process-cleanup";
7
9
  import { createConfigHandler } from "./plugin-handlers";
10
+ import { markServerRunningInProcess } from "./shared/tmux/tmux-utils/server-health";
11
+ import type { ModelFallbackControllerAccessor } from "./hooks/model-fallback";
12
+ type CreateManagersDeps = {
13
+ BackgroundManagerClass: typeof BackgroundManager;
14
+ SkillMcpManagerClass: typeof SkillMcpManager;
15
+ TmuxSessionManagerClass: typeof TmuxSessionManager;
16
+ initTaskToastManagerFn: typeof initTaskToastManager;
17
+ registerManagerForCleanupFn: typeof registerManagerForCleanup;
18
+ createConfigHandlerFn: typeof createConfigHandler;
19
+ markServerRunningInProcessFn: typeof markServerRunningInProcess;
20
+ };
8
21
  export type Managers = {
9
22
  tmuxSessionManager: TmuxSessionManager;
10
23
  backgroundManager: BackgroundManager;
11
24
  skillMcpManager: SkillMcpManager;
12
25
  configHandler: ReturnType<typeof createConfigHandler>;
26
+ modelFallbackControllerAccessor: ModelFallbackControllerAccessor;
13
27
  };
14
28
  export declare function createManagers(args: {
15
29
  ctx: PluginContext;
@@ -17,4 +31,6 @@ export declare function createManagers(args: {
17
31
  tmuxConfig: TmuxConfig;
18
32
  modelCacheState: ModelCacheState;
19
33
  backgroundNotificationHookEnabled: boolean;
34
+ deps?: Partial<CreateManagersDeps>;
20
35
  }): Managers;
36
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { OhMyOpenCodeConfig, TmuxConfig } from "./config";
2
+ export declare function isTmuxIntegrationEnabled(pluginConfig: {
3
+ tmux?: {
4
+ enabled?: boolean;
5
+ } | undefined;
6
+ }): boolean;
7
+ export declare function isInteractiveBashEnabled(which?: (binary: string) => string | null): boolean;
8
+ export declare function createRuntimeTmuxConfig(pluginConfig: {
9
+ tmux?: OhMyOpenCodeConfig["tmux"];
10
+ }): TmuxConfig;
@@ -4,7 +4,7 @@ import type { BrowserAutomationProvider } from "./config/schema/browser-automati
4
4
  import type { LoadedSkill } from "./features/opencode-skill-loader/types";
5
5
  import type { PluginContext, ToolsRecord } from "./plugin/types";
6
6
  import type { Managers } from "./create-managers";
7
- export type CreateToolsResult = {
7
+ type CreateToolsResult = {
8
8
  filteredTools: ToolsRecord;
9
9
  mergedSkills: LoadedSkill[];
10
10
  availableSkills: AvailableSkill[];
@@ -16,5 +16,6 @@ export type CreateToolsResult = {
16
16
  export declare function createTools(args: {
17
17
  ctx: PluginContext;
18
18
  pluginConfig: OhMyOpenCodeConfig;
19
- managers: Pick<Managers, "backgroundManager" | "tmuxSessionManager" | "skillMcpManager">;
19
+ managers: Pick<Managers, "backgroundManager" | "tmuxSessionManager" | "skillMcpManager" | "modelFallbackControllerAccessor">;
20
20
  }): Promise<CreateToolsResult>;
21
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { OpencodeClient } from "./opencode-client";
2
+ export declare function abortWithTimeout(client: OpencodeClient, sessionID: string, timeoutMs?: number): Promise<boolean>;
@@ -1,10 +1,16 @@
1
- import type { BackgroundTask } from "./types";
2
- export type BackgroundTaskNotificationStatus = "COMPLETED" | "CANCELLED" | "INTERRUPTED";
1
+ import type { BackgroundTaskStatus } from "./types";
2
+ export type BackgroundTaskNotificationStatus = "COMPLETED" | "CANCELLED" | "INTERRUPTED" | "ERROR";
3
+ export interface BackgroundTaskNotificationTask {
4
+ id: string;
5
+ description: string;
6
+ status: BackgroundTaskStatus;
7
+ error?: string;
8
+ }
3
9
  export declare function buildBackgroundTaskNotificationText(input: {
4
- task: BackgroundTask;
10
+ task: BackgroundTaskNotificationTask;
5
11
  duration: string;
6
12
  statusText: BackgroundTaskNotificationStatus;
7
13
  allComplete: boolean;
8
14
  remainingCount: number;
9
- completedTasks: BackgroundTask[];
15
+ completedTasks: BackgroundTaskNotificationTask[];
10
16
  }): string;
@@ -1,5 +1,7 @@
1
1
  import type { StoredMessage } from "../hook-message-injector";
2
+ export { isCompactionAgent } from "../../shared/compaction-marker";
2
3
  type SessionMessage = {
4
+ id?: string;
3
5
  info?: {
4
6
  agent?: string;
5
7
  model?: {
@@ -11,8 +13,9 @@ type SessionMessage = {
11
13
  modelID?: string;
12
14
  tools?: StoredMessage["tools"];
13
15
  };
16
+ parts?: Array<{
17
+ type?: string;
18
+ }>;
14
19
  };
15
- export declare function isCompactionAgent(agent: string | undefined): boolean;
16
20
  export declare function resolvePromptContextFromSessionMessages(messages: SessionMessage[], sessionID?: string): StoredMessage | null;
17
21
  export declare function findNearestMessageExcludingCompaction(messageDir: string, sessionID?: string): StoredMessage | null;
18
- export {};
@@ -9,6 +9,7 @@ export declare const DEFAULT_MAX_TOOL_CALLS = 4000;
9
9
  export declare const DEFAULT_CIRCUIT_BREAKER_CONSECUTIVE_THRESHOLD = 20;
10
10
  export declare const DEFAULT_CIRCUIT_BREAKER_ENABLED = true;
11
11
  export declare const MIN_RUNTIME_BEFORE_STALE_MS = 30000;
12
+ export declare const DEFAULT_SESSION_GONE_TIMEOUT_MS = 60000;
12
13
  export declare const MIN_IDLE_TIME_MS = 5000;
13
14
  export declare const POLLING_INTERVAL_MS = 3000;
14
15
  export declare const TASK_CLEANUP_DELAY_MS: number;
@@ -13,4 +13,4 @@ export declare function tryFallbackRetry(args: {
13
13
  idleDeferralTimers: Map<string, ReturnType<typeof setTimeout>>;
14
14
  queuesByKey: Map<string, QueueItem[]>;
15
15
  processKey: (key: string) => void;
16
- }): boolean;
16
+ }): Promise<boolean>;
@@ -1,2 +1,4 @@
1
1
  export * from "./types";
2
2
  export { BackgroundManager, type SubagentSessionCreatedEvent, type OnSubagentSessionCreated } from "./manager";
3
+ export { waitForTaskSessionID } from "./wait-for-task-session";
4
+ export type { WaitForTaskSessionIDOptions } from "./wait-for-task-session";
@@ -41,6 +41,8 @@ export declare class BackgroundManager {
41
41
  private completedTaskSummaries;
42
42
  private idleDeferralTimers;
43
43
  private notificationQueueByParent;
44
+ private observedOutputSessions;
45
+ private observedIncompleteTodosBySession;
44
46
  private rootDescendantCounts;
45
47
  private preStartDescendantReservations;
46
48
  private enableParentSessionNotifications;
@@ -52,6 +54,7 @@ export declare class BackgroundManager {
52
54
  onShutdown?: () => void | Promise<void>;
53
55
  enableParentSessionNotifications?: boolean;
54
56
  });
57
+ private abortSessionWithLogging;
55
58
  assertCanSpawn(parentSessionID: string): Promise<SubagentSpawnContext>;
56
59
  reserveSubagentSpawn(parentSessionID: string): Promise<{
57
60
  spawnContext: SubagentSpawnContext;
@@ -87,7 +90,12 @@ export declare class BackgroundManager {
87
90
  }): Promise<BackgroundTask>;
88
91
  resume(input: ResumeInput): Promise<BackgroundTask>;
89
92
  private checkSessionTodos;
93
+ private markSessionOutputObserved;
94
+ private clearSessionOutputObserved;
95
+ private clearSessionTodoObservation;
96
+ private hasOutputSignalFromPart;
90
97
  handleEvent(event: Event): void;
98
+ private handleSessionErrorEvent;
91
99
  private tryFallbackRetry;
92
100
  markForNotification(task: BackgroundTask): void;
93
101
  getPendingNotifications(sessionID: string): BackgroundTask[];
@@ -145,6 +153,8 @@ export declare class BackgroundManager {
145
153
  private hasRunningTasks;
146
154
  private pruneStaleTasksAndNotifications;
147
155
  private checkAndInterruptStaleTasks;
156
+ private verifySessionExists;
157
+ private failCrashedTask;
148
158
  private pollRunningTasks;
149
159
  /**
150
160
  * Shutdown the manager gracefully.
@@ -3,6 +3,6 @@ interface CleanupTarget {
3
3
  }
4
4
  export declare function registerManagerForCleanup(manager: CleanupTarget): void;
5
5
  export declare function unregisterManagerForCleanup(manager: CleanupTarget): void;
6
- /** @internal test-only reset for module-level singleton state */
6
+ /** @internal - test-only reset for module-level singleton state */
7
7
  export declare function _resetForTesting(): void;
8
8
  export {};
@@ -0,0 +1,3 @@
1
+ import type { OpencodeClient } from "./opencode-client";
2
+ export declare const MIN_SESSION_GONE_POLLS = 3;
3
+ export declare function verifySessionExists(client: OpencodeClient, sessionID: string, directory?: string): Promise<boolean>;
@@ -1,6 +1,9 @@
1
1
  import type { BackgroundTask, LaunchInput, ResumeInput } from "./types";
2
2
  import type { OpencodeClient, OnSubagentSessionCreated, QueueItem } from "./constants";
3
3
  import type { ConcurrencyManager } from "./concurrency";
4
+ export declare const FALLBACK_AGENT = "general";
5
+ export declare function isAgentNotFoundError(error: unknown): boolean;
6
+ export declare function buildFallbackBody(originalBody: Record<string, unknown>, fallbackAgent: string): Record<string, unknown>;
4
7
  export interface SpawnerContext {
5
8
  client: OpencodeClient;
6
9
  directory: string;
@@ -1,23 +1,16 @@
1
1
  import type { BackgroundTaskConfig } from "../../config/schema";
2
2
  import type { OpencodeClient } from "./constants";
3
3
  export declare const DEFAULT_MAX_SUBAGENT_DEPTH = 3;
4
- export declare const DEFAULT_MAX_ROOT_SESSION_SPAWN_BUDGET = 50;
5
4
  export interface SubagentSpawnContext {
6
5
  rootSessionID: string;
7
6
  parentDepth: number;
8
7
  childDepth: number;
9
8
  }
10
9
  export declare function getMaxSubagentDepth(config?: BackgroundTaskConfig): number;
11
- export declare function getMaxRootSessionSpawnBudget(config?: BackgroundTaskConfig): number;
12
- export declare function resolveSubagentSpawnContext(client: OpencodeClient, parentSessionID: string): Promise<SubagentSpawnContext>;
10
+ export declare function resolveSubagentSpawnContext(client: OpencodeClient, parentSessionID: string, directory?: string): Promise<SubagentSpawnContext>;
13
11
  export declare function createSubagentDepthLimitError(input: {
14
12
  childDepth: number;
15
13
  maxDepth: number;
16
14
  parentSessionID: string;
17
15
  rootSessionID: string;
18
16
  }): Error;
19
- export declare function createSubagentDescendantLimitError(input: {
20
- rootSessionID: string;
21
- descendantCount: number;
22
- maxDescendants: number;
23
- }): Error;
@@ -6,6 +6,7 @@ export declare function pruneStaleTasksAndNotifications(args: {
6
6
  tasks: Map<string, BackgroundTask>;
7
7
  notifications: Map<string, BackgroundTask[]>;
8
8
  onTaskPruned: (taskId: string, task: BackgroundTask, errorMessage: string) => void;
9
+ taskTtlMs?: number;
9
10
  }): void;
10
11
  export type SessionStatusMap = Record<string, {
11
12
  type: string;
@@ -13,6 +14,7 @@ export type SessionStatusMap = Record<string, {
13
14
  export declare function checkAndInterruptStaleTasks(args: {
14
15
  tasks: Iterable<BackgroundTask>;
15
16
  client: OpencodeClient;
17
+ directory?: string;
16
18
  config: BackgroundTaskConfig | undefined;
17
19
  concurrencyManager: ConcurrencyManager;
18
20
  notifyParentSession: (task: BackgroundTask) => Promise<void>;
@@ -58,6 +58,8 @@ export interface BackgroundTask {
58
58
  lastMsgCount?: number;
59
59
  /** Number of consecutive polls with stable message count */
60
60
  stablePolls?: number;
61
+ /** Number of consecutive polls where session was missing from status map */
62
+ consecutiveMissedPolls?: number;
61
63
  }
62
64
  export interface LaunchInput {
63
65
  description: string;
@@ -0,0 +1,17 @@
1
+ import type { BackgroundTaskStatus } from "./types";
2
+ type AbortSignalLike = {
3
+ aborted: boolean;
4
+ };
5
+ interface TaskReader {
6
+ getTask(taskID: string): {
7
+ sessionID?: string;
8
+ status?: BackgroundTaskStatus;
9
+ } | undefined;
10
+ }
11
+ export interface WaitForTaskSessionIDOptions {
12
+ timeoutMs?: number;
13
+ intervalMs?: number;
14
+ signal?: AbortSignalLike;
15
+ }
16
+ export declare function waitForTaskSessionID(manager: TaskReader, taskID: string, options?: WaitForTaskSessionIDOptions): Promise<string | undefined>;
17
+ export {};
@@ -7,7 +7,7 @@ import type { BoulderState, PlanProgress, TaskSessionState } from "./types";
7
7
  export declare function getBoulderFilePath(directory: string): string;
8
8
  export declare function readBoulderState(directory: string): BoulderState | null;
9
9
  export declare function writeBoulderState(directory: string, state: BoulderState): boolean;
10
- export declare function appendSessionId(directory: string, sessionId: string): BoulderState | null;
10
+ export declare function appendSessionId(directory: string, sessionId: string, origin?: "direct" | "appended"): BoulderState | null;
11
11
  export declare function clearBoulderState(directory: string): boolean;
12
12
  export declare function getTaskSessionState(directory: string, taskKey: string): TaskSessionState | null;
13
13
  export declare function upsertTaskSessionState(directory: string, input: {
@@ -25,6 +25,13 @@ export declare function upsertTaskSessionState(directory: string, input: {
25
25
  export declare function findPrometheusPlans(directory: string): string[];
26
26
  /**
27
27
  * Parse a plan file and count checkbox progress.
28
+ *
29
+ * Only top-level (zero-indent) checkboxes under `## TODOs` and
30
+ * `## Final Verification Wave` sections are counted. The checkbox
31
+ * body must carry a valid task label (`N.` for TODOs, `FN.` for
32
+ * Final Verification Wave). Nested acceptance-criteria checkboxes
33
+ * and checkboxes in other sections are intentionally ignored so
34
+ * that progress tracking stays aligned with `readCurrentTopLevelTask`.
28
35
  */
29
36
  export declare function getPlanProgress(planPath: string): PlanProgress;
30
37
  /**
@@ -11,6 +11,7 @@ export interface BoulderState {
11
11
  started_at: string;
12
12
  /** Session IDs that have worked on this plan */
13
13
  session_ids: string[];
14
+ session_origins?: Record<string, "direct" | "appended">;
14
15
  /** Plan name derived from filename */
15
16
  plan_name: string;
16
17
  /** Agent type to use when resuming (e.g., 'atlas') */
@@ -1,2 +1,6 @@
1
1
  import type { BuiltinCommandName, BuiltinCommands } from "./types";
2
- export declare function loadBuiltinCommands(disabledCommands?: BuiltinCommandName[]): BuiltinCommands;
2
+ interface LoadBuiltinCommandsOptions {
3
+ useRegisteredAgents?: boolean;
4
+ }
5
+ export declare function loadBuiltinCommands(disabledCommands?: BuiltinCommandName[], options?: LoadBuiltinCommandsOptions): BuiltinCommands;
6
+ export {};
@@ -1 +1 @@
1
- export declare const HANDOFF_TEMPLATE = "# Handoff Command\n\n## Purpose\n\nUse /handoff when:\n- The current session context is getting too long and quality is degrading\n- You want to start fresh while preserving essential context from this session\n- The context window is approaching capacity\n\nThis creates a detailed context summary that can be used to continue work in a new session.\n\n---\n\n# PHASE 0: VALIDATE REQUEST\n\nBefore proceeding, confirm:\n- [ ] There is meaningful work or context in this session to preserve\n- [ ] The user wants to create a handoff summary (not just asking about it)\n\nIf the session is nearly empty or has no meaningful context, inform the user there is nothing substantial to hand off.\n\n---\n\n# PHASE 1: GATHER PROGRAMMATIC CONTEXT\n\nExecute these tools to gather concrete data:\n\n1. session_read({ session_id: \"$SESSION_ID\" }) \u2014 full session history\n2. todoread() \u2014 current task progress\n3. Bash({ command: \"git diff --stat HEAD~10..HEAD\" }) \u2014 recent file changes\n4. Bash({ command: \"git status --porcelain\" }) \u2014 uncommitted changes\n\nSuggested execution order:\n\n```\nsession_read({ session_id: \"$SESSION_ID\" })\ntodoread()\nBash({ command: \"git diff --stat HEAD~10..HEAD\" })\nBash({ command: \"git status --porcelain\" })\n```\n\nAnalyze the gathered outputs to understand:\n- What the user asked for (exact wording)\n- What work was completed\n- What tasks remain incomplete (include todo state)\n- What decisions were made\n- What files were modified or discussed (include git diff/stat + status)\n- What patterns, constraints, or preferences were established\n\n---\n\n# PHASE 2: EXTRACT CONTEXT\n\nWrite the context summary from first person perspective (\"I did...\", \"I told you...\").\n\nFocus on:\n- Capabilities and behavior, not file-by-file implementation details\n- What matters for continuing the work\n- Avoiding excessive implementation details (variable names, storage keys, constants) unless critical\n- USER REQUESTS (AS-IS) must be verbatim (do not paraphrase)\n- EXPLICIT CONSTRAINTS must be verbatim only (do not invent)\n\nQuestions to consider when extracting:\n- What did I just do or implement?\n- What instructions did I already give which are still relevant (e.g. follow patterns in the codebase)?\n- What files did I tell you are important or that I am working on?\n- Did I provide a plan or spec that should be included?\n- What did I already tell you that is important (libraries, patterns, constraints, preferences)?\n- What important technical details did I discover (APIs, methods, patterns)?\n- What caveats, limitations, or open questions did I find?\n\n---\n\n# PHASE 3: FORMAT OUTPUT\n\nGenerate a handoff summary using this exact format:\n\n```\nHANDOFF CONTEXT\n===============\n\nUSER REQUESTS (AS-IS)\n---------------------\n- [Exact verbatim user requests - NOT paraphrased]\n\nGOAL\n----\n[One sentence describing what should be done next]\n\nWORK COMPLETED\n--------------\n- [First person bullet points of what was done]\n- [Include specific file paths when relevant]\n- [Note key implementation decisions]\n\nCURRENT STATE\n-------------\n- [Current state of the codebase or task]\n- [Build/test status if applicable]\n- [Any environment or configuration state]\n\nPENDING TASKS\n-------------\n- [Tasks that were planned but not completed]\n- [Next logical steps to take]\n- [Any blockers or issues encountered]\n- [Include current todo state from todoread()]\n\nKEY FILES\n---------\n- [path/to/file1] - [brief role description]\n- [path/to/file2] - [brief role description]\n(Maximum 10 files, prioritized by importance)\n- (Include files from git diff/stat and git status)\n\nIMPORTANT DECISIONS\n-------------------\n- [Technical decisions that were made and why]\n- [Trade-offs that were considered]\n- [Patterns or conventions established]\n\nEXPLICIT CONSTRAINTS\n--------------------\n- [Verbatim constraints only - from user or existing AGENTS.md]\n- If none, write: None\n\nCONTEXT FOR CONTINUATION\n------------------------\n- [What the next session needs to know to continue]\n- [Warnings or gotchas to be aware of]\n- [References to documentation if relevant]\n```\n\nRules for the summary:\n- Plain text with bullets\n- No markdown headers with # (use the format above with dashes)\n- No bold, italic, or code fences within content\n- Use workspace-relative paths for files\n- Keep it focused - only include what matters for continuation\n- Pick an appropriate length based on complexity\n- USER REQUESTS (AS-IS) and EXPLICIT CONSTRAINTS must be verbatim only\n\n---\n\n# PHASE 4: PROVIDE INSTRUCTIONS\n\nAfter generating the summary, instruct the user:\n\n```\n---\n\nTO CONTINUE IN A NEW SESSION:\n\n1. Press 'n' in OpenCode TUI to open a new session, or run 'opencode' in a new terminal\n2. Paste the HANDOFF CONTEXT above as your first message\n3. Add your request: \"Continue from the handoff context above. [Your next task]\"\n\nThe new session will have all context needed to continue seamlessly.\n```\n\n---\n\n# IMPORTANT CONSTRAINTS\n\n- DO NOT attempt to programmatically create new sessions (no API available to agents)\n- DO provide a self-contained summary that works without access to this session\n- DO include workspace-relative file paths\n- DO NOT include sensitive information (API keys, credentials, secrets)\n- DO NOT exceed 10 files in the KEY FILES section\n- DO keep the GOAL section to a single sentence or short paragraph\n\n---\n\n# EXECUTE NOW\n\nBegin by gathering programmatic context, then synthesize the handoff summary.\n";
1
+ export declare const HANDOFF_TEMPLATE = "# Handoff Command\n\n## Purpose\n\nUse /handoff when:\n- The current session context is getting too long and quality is degrading\n- You want to start fresh while preserving essential context from this session\n- The context window is approaching capacity\n\nThis creates a detailed context summary that can be used to continue work in a new session.\n\n---\n\n# PHASE 0: VALIDATE REQUEST\n\nBefore proceeding, confirm:\n- [ ] There is meaningful work or context in this session to preserve\n- [ ] The user wants to create a handoff summary (not just asking about it)\n\nIf the session is nearly empty or has no meaningful context, inform the user there is nothing substantial to hand off.\n\n---\n\n# PHASE 1: GATHER PROGRAMMATIC CONTEXT\n\nExecute these tools to gather concrete data:\n\n1. session_read({ session_id: \"$SESSION_ID\" }) - full session history\n2. todoread() - current task progress\n3. Bash({ command: \"git diff --stat HEAD~10..HEAD\" }) - recent file changes\n4. Bash({ command: \"git status --porcelain\" }) - uncommitted changes\n\nSuggested execution order:\n\n```\nsession_read({ session_id: \"$SESSION_ID\" })\ntodoread()\nBash({ command: \"git diff --stat HEAD~10..HEAD\" })\nBash({ command: \"git status --porcelain\" })\n```\n\nAnalyze the gathered outputs to understand:\n- What the user asked for (exact wording)\n- What work was completed\n- What tasks remain incomplete (include todo state)\n- What decisions were made\n- What files were modified or discussed (include git diff/stat + status)\n- What patterns, constraints, or preferences were established\n\n---\n\n# PHASE 2: EXTRACT CONTEXT\n\nWrite the context summary from first person perspective (\"I did...\", \"I told you...\").\n\nFocus on:\n- Capabilities and behavior, not file-by-file implementation details\n- What matters for continuing the work\n- Avoiding excessive implementation details (variable names, storage keys, constants) unless critical\n- USER REQUESTS (AS-IS) must be verbatim (do not paraphrase)\n- EXPLICIT CONSTRAINTS must be verbatim only (do not invent)\n\nQuestions to consider when extracting:\n- What did I just do or implement?\n- What instructions did I already give which are still relevant (e.g. follow patterns in the codebase)?\n- What files did I tell you are important or that I am working on?\n- Did I provide a plan or spec that should be included?\n- What did I already tell you that is important (libraries, patterns, constraints, preferences)?\n- What important technical details did I discover (APIs, methods, patterns)?\n- What caveats, limitations, or open questions did I find?\n\n---\n\n# PHASE 3: FORMAT OUTPUT\n\nGenerate a handoff summary using this exact format:\n\n```\nHANDOFF CONTEXT\n===============\n\nUSER REQUESTS (AS-IS)\n---------------------\n- [Exact verbatim user requests - NOT paraphrased]\n\nGOAL\n----\n[One sentence describing what should be done next]\n\nWORK COMPLETED\n--------------\n- [First person bullet points of what was done]\n- [Include specific file paths when relevant]\n- [Note key implementation decisions]\n\nCURRENT STATE\n-------------\n- [Current state of the codebase or task]\n- [Build/test status if applicable]\n- [Any environment or configuration state]\n\nPENDING TASKS\n-------------\n- [Tasks that were planned but not completed]\n- [Next logical steps to take]\n- [Any blockers or issues encountered]\n- [Include current todo state from todoread()]\n\nKEY FILES\n---------\n- [path/to/file1] - [brief role description]\n- [path/to/file2] - [brief role description]\n(Maximum 10 files, prioritized by importance)\n- (Include files from git diff/stat and git status)\n\nIMPORTANT DECISIONS\n-------------------\n- [Technical decisions that were made and why]\n- [Trade-offs that were considered]\n- [Patterns or conventions established]\n\nEXPLICIT CONSTRAINTS\n--------------------\n- [Verbatim constraints only - from user or existing AGENTS.md]\n- If none, write: None\n\nCONTEXT FOR CONTINUATION\n------------------------\n- [What the next session needs to know to continue]\n- [Warnings or gotchas to be aware of]\n- [References to documentation if relevant]\n```\n\nRules for the summary:\n- Plain text with bullets\n- No markdown headers with # (use the format above with dashes)\n- No bold, italic, or code fences within content\n- Use workspace-relative paths for files\n- Keep it focused - only include what matters for continuation\n- Pick an appropriate length based on complexity\n- USER REQUESTS (AS-IS) and EXPLICIT CONSTRAINTS must be verbatim only\n\n---\n\n# PHASE 4: PROVIDE INSTRUCTIONS\n\nAfter generating the summary, instruct the user:\n\n```\n---\n\nTO CONTINUE IN A NEW SESSION:\n\n1. Press 'n' in OpenCode TUI to open a new session, or run 'opencode' in a new terminal\n2. Paste the HANDOFF CONTEXT above as your first message\n3. Add your request: \"Continue from the handoff context above. [Your next task]\"\n\nThe new session will have all context needed to continue seamlessly.\n```\n\n---\n\n# IMPORTANT CONSTRAINTS\n\n- DO NOT attempt to programmatically create new sessions (no API available to agents)\n- DO provide a self-contained summary that works without access to this session\n- DO include workspace-relative file paths\n- DO NOT include sensitive information (API keys, credentials, secrets)\n- DO NOT exceed 10 files in the KEY FILES section\n- DO keep the GOAL section to a single sentence or short paragraph\n\n---\n\n# EXECUTE NOW\n\nBegin by gathering programmatic context, then synthesize the handoff summary.\n";
@@ -1 +1 @@
1
- export declare const INIT_DEEP_TEMPLATE = "# /init-deep\n\n\u751F\u6210\u5C42\u6B21\u5316\u7684 AGENTS.md \u6587\u4EF6\u3002\u6839\u76EE\u5F55 + \u6309\u590D\u6742\u5EA6\u8BC4\u5206\u7684\u5B50\u76EE\u5F55\u3002\n\n## \u4F7F\u7528\u65B9\u6CD5\n\n```\n/init-deep # \u66F4\u65B0\u6A21\u5F0F: \u4FEE\u6539\u73B0\u6709 + \u5728\u9700\u8981\u65F6\u521B\u5EFA\u65B0\u7684\n/init-deep --create-new # \u8BFB\u53D6\u73B0\u6709 \u2192 \u5220\u9664\u5168\u90E8 \u2192 \u4ECE\u5934\u91CD\u65B0\u751F\u6210\n/init-deep --max-depth=2 # \u9650\u5236\u76EE\u5F55\u6DF1\u5EA6 (\u9ED8\u8BA4: 3)\n```\n\n---\n\n## \u5DE5\u4F5C\u6D41\u7A0B (\u6982\u8981)\n\n1. **\u53D1\u73B0 + \u5206\u6790** (\u5E76\u884C)\n - \u7ACB\u5373\u89E6\u53D1\u540E\u53F0 explore agents\n - \u4E3B\u4F1A\u8BDD: bash \u7ED3\u6784 + LSP codemap + \u8BFB\u53D6\u73B0\u6709 AGENTS.md\n2. **\u8BC4\u5206\u548C\u51B3\u7B56** - \u4ECE\u5408\u5E76\u7684\u53D1\u73B0\u4E2D\u786E\u5B9A AGENTS.md \u4F4D\u7F6E\n3. **\u751F\u6210** - \u6839\u76EE\u5F55\u4F18\u5148\uFF0C\u7136\u540E\u5E76\u884C\u5904\u7406\u5B50\u76EE\u5F55\n4. **\u5BA1\u67E5** - \u53BB\u91CD\u3001\u4FEE\u526A\u3001\u9A8C\u8BC1\n\n<critical>\n**TodoWrite \u6240\u6709\u9636\u6BB5\u3002\u5B9E\u65F6\u6807\u8BB0 in_progress \u2192 completed\u3002**\n```\nTodoWrite([\n { id: \"discovery\", content: \"\u89E6\u53D1 explore agents + LSP codemap + \u8BFB\u53D6\u73B0\u6709\", status: \"pending\", priority: \"high\" },\n { id: \"scoring\", content: \"\u4E3A\u76EE\u5F55\u8BC4\u5206\uFF0C\u786E\u5B9A\u4F4D\u7F6E\", status: \"pending\", priority: \"high\" },\n { id: \"generate\", content: \"\u751F\u6210 AGENTS.md \u6587\u4EF6 (\u6839\u76EE\u5F55 + \u5B50\u76EE\u5F55)\", status: \"pending\", priority: \"high\" },\n { id: \"review\", content: \"\u53BB\u91CD\u3001\u9A8C\u8BC1\u3001\u4FEE\u526A\", status: \"pending\", priority: \"medium\" }\n])\n```\n</critical>\n\n---\n\n## Phase 1: \u53D1\u73B0 + \u5206\u6790 (\u5E76\u884C)\n\n**\u5C06 \"discovery\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n### \u7ACB\u5373\u89E6\u53D1\u540E\u53F0 Explore Agents\n\n\u4E0D\u8981\u7B49\u5F85 \u2014 \u8FD9\u4E9B\u5F02\u6B65\u8FD0\u884C\uFF0C\u800C\u4E3B\u4F1A\u8BDD\u540C\u65F6\u5DE5\u4F5C\u3002\n\n```\n// \u540C\u65F6\u89E6\u53D1\uFF0C\u7A0D\u540E\u6536\u96C6\u7ED3\u679C\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore project structure / \u63A2\u7D22\u9879\u76EE\u7ED3\u6784\", run_in_background=true, prompt=\"Project structure: PREDICT standard patterns for detected language \u2192 REPORT deviations only / \u9879\u76EE\u7ED3\u6784: \u9884\u6D4B\u68C0\u6D4B\u5230\u8BED\u8A00\u7684\u6807\u51C6\u6A21\u5F0F \u2192 \u4EC5\u62A5\u544A\u504F\u79BB\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find entry points / \u627E\u5230\u5165\u53E3\u70B9\", run_in_background=true, prompt=\"Entry points: FIND main files \u2192 REPORT non-standard organization / \u5165\u53E3\u70B9: \u627E\u5230\u4E3B\u6587\u4EF6 \u2192 \u62A5\u544A\u975E\u6807\u51C6\u7EC4\u7EC7\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find conventions / \u627E\u5230\u7EA6\u5B9A\", run_in_background=true, prompt=\"Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) \u2192 REPORT project-specific rules / \u7EA6\u5B9A: \u627E\u5230\u914D\u7F6E\u6587\u4EF6 \u2192 \u62A5\u544A\u9879\u76EE\u7279\u5B9A\u89C4\u5219\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find anti-patterns / \u627E\u5230\u53CD\u6A21\u5F0F\", run_in_background=true, prompt=\"Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments \u2192 LIST forbidden patterns / \u53CD\u6A21\u5F0F: \u627E\u5230\u7981\u6B62\u6CE8\u91CA \u2192 \u5217\u51FA\u7981\u6B62\u7684\u6A21\u5F0F\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore build/CI / \u63A2\u7D22\u6784\u5EFA/CI\", run_in_background=true, prompt=\"Build/CI: FIND .github/workflows, Makefile \u2192 REPORT non-standard patterns / \u6784\u5EFA/CI: \u627E\u5230\u5DE5\u4F5C\u6D41\u6587\u4EF6 \u2192 \u62A5\u544A\u975E\u6807\u51C6\u6A21\u5F0F\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find test patterns / \u627E\u5230\u6D4B\u8BD5\u6A21\u5F0F\", run_in_background=true, prompt=\"Test patterns: FIND test configs, test structure \u2192 REPORT unique conventions / \u6D4B\u8BD5\u6A21\u5F0F: \u627E\u5230\u6D4B\u8BD5\u914D\u7F6E\u3001\u6D4B\u8BD5\u7ED3\u6784 \u2192 \u62A5\u544A\u72EC\u7279\u7684\u7EA6\u5B9A\")\n```\n\n<dynamic-agents>\n**\u52A8\u6001 Agent \u751F\u6210**: \u5728 bash \u5206\u6790\u4E4B\u540E\uFF0C\u6839\u636E\u9879\u76EE\u89C4\u6A21\u751F\u6210\u989D\u5916\u7684 explore agents:\n\n| Factor / \u56E0\u7D20 | Threshold / \u9608\u503C | Additional Agents / \u989D\u5916 Agents |\n|--------|-----------|-------------------|\n| **Total files / \u603B\u6587\u4EF6\u6570** | >100 | \u6BCF 100 \u4E2A\u6587\u4EF6 +1 |\n| **Total lines / \u603B\u884C\u6570** | >10k | \u6BCF 10k \u884C +1 |\n| **Directory depth / \u76EE\u5F55\u6DF1\u5EA6** | \u22654 | \u6DF1\u5EA6\u63A2\u7D22 +2 |\n| **Large files (>500 lines) / \u5927\u6587\u4EF6 (>500 \u884C)** | >10 files / 10 \u4E2A\u6587\u4EF6 | \u590D\u6742\u5EA6\u70ED\u70B9 +1 |\n| **Monorepo** | detected / \u68C0\u6D4B\u5230 | \u6BCF\u4E2A package/workspace +1 |\n| **Multiple languages / \u591A\u8BED\u8A00** | >1 | \u6BCF\u79CD\u8BED\u8A00 +1 |\n\n```bash\n# \u9996\u5148\u6D4B\u91CF\u9879\u76EE\u89C4\u6A21\ntotal_files=$(find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | wc -l)\ntotal_lines=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" -o -name \"*.go\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print $1}')\nlarge_files=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {count++} END {print count+0}')\nmax_depth=$(find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' | awk -F/ '{print NF}' | sort -rn | head -1)\n```\n\n\u751F\u6210\u793A\u4F8B:\n```\n// 500 files, 50k lines, depth 6, 15 large files \u2192 spawn 5+5+2+1 = 13 additional agents\n// \u751F\u6210 5+5+2+1 = 13 \u4E2A\u989D\u5916 agents\ntask(subagent_type=\"explore\", load_skills=[], description=\"Analyze large files / \u5206\u6790\u5927\u6587\u4EF6\", run_in_background=true, prompt=\"Large file analysis: FIND files >500 lines, REPORT complexity hotspots / \u5927\u6587\u4EF6\u5206\u6790: \u627E\u5230 >500 \u884C\u7684\u6587\u4EF6\uFF0C\u62A5\u544A\u590D\u6742\u5EA6\u70ED\u70B9\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore deep modules / \u63A2\u7D22\u6DF1\u5C42\u6A21\u5757\", run_in_background=true, prompt=\"Deep modules at depth 4+: FIND hidden patterns, internal conventions / \u6DF1\u5EA6 4+ \u7684\u6A21\u5757: \u627E\u5230\u9690\u85CF\u6A21\u5F0F\u3001\u5185\u90E8\u7EA6\u5B9A\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find shared utilities / \u627E\u5230\u5171\u4EAB\u5DE5\u5177\", run_in_background=true, prompt=\"Cross-cutting concerns: FIND shared utilities across directories / \u6A2A\u5207\u5173\u6CE8\u70B9: \u627E\u5230\u8DE8\u76EE\u5F55\u7684\u5171\u4EAB\u5DE5\u5177\")\n// ... \u6839\u636E\u8BA1\u7B97\u66F4\u591A\n```\n</dynamic-agents>\n\n### \u4E3B\u4F1A\u8BDD: \u5E76\u884C\u5206\u6790\n\n**\u5F53\u540E\u53F0 agents \u8FD0\u884C\u65F6**\uFF0C\u4E3B\u4F1A\u8BDD\u6267\u884C:\n\n#### 1. Bash \u7ED3\u6784\u5206\u6790\n```bash\n# \u76EE\u5F55\u6DF1\u5EA6 + \u6587\u4EF6\u8BA1\u6570\nfind . -type d -not -path '*/\\.*' -not -path '*/node_modules/*' -not -path '*/venv/*' -not -path '*/dist/*' -not -path '*/build/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c\n\n# \u6BCF\u4E2A\u76EE\u5F55\u7684\u6587\u4EF6\u6570 (\u524D 30)\nfind . -type f -not -path '*/\\.*' -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30\n\n# \u6309\u6269\u5C55\u540D\u7684\u4EE3\u7801\u96C6\u4E2D\u5EA6\nfind . -type f \\( -name \"*.py\" -o -name \"*.ts\" -o -name \"*.tsx\" -o -name \"*.js\" -o -name \"*.go\" -o -name \"*.rs\" \\) -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20\n\n# \u73B0\u6709\u7684 AGENTS.md / CLAUDE.md\nfind . -type f \\( -name \"AGENTS.md\" -o -name \"CLAUDE.md\" \\) -not -path '*/node_modules/*' 2>/dev/null\n```\n\n#### 2. \u8BFB\u53D6\u73B0\u6709 AGENTS.md\n```\nFor each existing file found / \u5BF9\u4E8E\u627E\u5230\u7684\u6BCF\u4E2A\u73B0\u6709\u6587\u4EF6:\n Read(filePath=file)\n Extract: key insights, conventions, anti-patterns / \u63D0\u53D6: \u5173\u952E\u6D1E\u5BDF\u3001\u7EA6\u5B9A\u3001\u53CD\u6A21\u5F0F\n Store in EXISTING_AGENTS map / \u5B58\u50A8\u5728 EXISTING_AGENTS \u6620\u5C04\u4E2D\n```\n\n\u5982\u679C `--create-new`: \u5148\u8BFB\u53D6\u6240\u6709\u73B0\u6709\u7684\uFF08\u4FDD\u7559\u4E0A\u4E0B\u6587\uFF09\u2192 \u7136\u540E\u5220\u9664\u6240\u6709 \u2192 \u91CD\u65B0\u751F\u6210\u3002\n\n#### 3. LSP Codemap (\u5982\u679C\u53EF\u7528)\n```\nLspServers() # Check availability / \u68C0\u67E5\u53EF\u7528\u6027\n\n# Entry points (parallel) / \u5165\u53E3\u70B9 (\u5E76\u884C)\nLspDocumentSymbols(filePath=\"src/index.ts\")\nLspDocumentSymbols(filePath=\"main.py\")\n\n# Key symbols (parallel) / \u5173\u952E\u7B26\u53F7 (\u5E76\u884C)\nLspWorkspaceSymbols(filePath=\".\", query=\"class\")\nLspWorkspaceSymbols(filePath=\".\", query=\"interface\")\nLspWorkspaceSymbols(filePath=\".\", query=\"function\")\n\n# Centrality for top exports / \u9876\u90E8\u5BFC\u51FA\u7684\u4E2D\u5FC3\u6027\nLspFindReferences(filePath=\"...\", line=X, character=Y)\n```\n\n**LSP \u56DE\u9000**: \u5982\u679C\u4E0D\u53EF\u7528\uFF0C\u4F9D\u8D56 explore agents + AST-grep\u3002\n\n### \u6536\u96C6\u540E\u53F0\u7ED3\u679C\n\n```\n// \u4E3B\u4F1A\u8BDD\u5206\u6790\u5B8C\u6210\u540E\uFF0C\u6536\u96C6\u6240\u6709\u4EFB\u52A1\u7ED3\u679C\nfor each task_id: background_output(task_id=\"...\")\n```\n\n**\u5408\u5E76: bash + LSP + \u73B0\u6709 + explore \u53D1\u73B0\u3002\u5C06 \"discovery\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## Phase 2: \u8BC4\u5206\u548C\u4F4D\u7F6E\u51B3\u7B56\n\n**\u5C06 \"scoring\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n### \u8BC4\u5206\u77E9\u9635\n\n| Factor / \u56E0\u7D20 | Weight / \u6743\u91CD | High Threshold / \u9AD8\u9608\u503C | Source / \u6765\u6E90 |\n|--------|--------|----------------|--------|\n| File count / \u6587\u4EF6\u6570 | 3x | >20 | bash |\n| Subdir count / \u5B50\u76EE\u5F55\u6570 | 2x | >5 | bash |\n| Code ratio / \u4EE3\u7801\u6BD4\u4F8B | 2x | >70% | bash |\n| Unique patterns / \u72EC\u7279\u6A21\u5F0F | 1x | Has own config / \u6709\u81EA\u5DF1\u7684\u914D\u7F6E | explore |\n| Module boundary / \u6A21\u5757\u8FB9\u754C | 2x | Has index.ts/__init__.py / \u6709\u7D22\u5F15\u6587\u4EF6 | bash |\n| Symbol density / \u7B26\u53F7\u5BC6\u5EA6 | 2x | >30 symbols / >30 \u4E2A\u7B26\u53F7 | LSP |\n| Export count / \u5BFC\u51FA\u6570 | 2x | >10 exports / >10 \u4E2A\u5BFC\u51FA | LSP |\n| Reference centrality / \u5F15\u7528\u4E2D\u5FC3\u6027 | 3x | >20 refs / >20 \u4E2A\u5F15\u7528 | LSP |\n\n### \u51B3\u7B56\u89C4\u5219\n\n| Score / \u8BC4\u5206 | Action / \u884C\u52A8 |\n|-------|--------|\n| **Root (.)** | \u59CB\u7EC8\u521B\u5EFA / ALWAYS create |\n| **>15** | \u521B\u5EFA AGENTS.md |\n| **8-15** | \u5982\u679C\u662F\u72EC\u7ACB\u9886\u57DF\u5219\u521B\u5EFA |\n| **<8** | \u8DF3\u8FC7 (\u7236\u7EA7\u8986\u76D6) |\n\n### \u8F93\u51FA\n```\nAGENTS_LOCATIONS = [\n { path: \".\", type: \"root\" },\n { path: \"src/hooks\", score: 18, reason: \"high complexity / \u9AD8\u590D\u6742\u5EA6\" },\n { path: \"src/api\", score: 12, reason: \"distinct domain / \u72EC\u7ACB\u9886\u57DF\" }\n]\n```\n\n**\u5C06 \"scoring\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## Phase 3: \u751F\u6210 AGENTS.md\n\n**\u5C06 \"generate\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n<critical>\n**\u6587\u4EF6\u5199\u5165\u89C4\u5219**: \u5982\u679C\u76EE\u6807\u8DEF\u5F84\u5DF2\u5B58\u5728 AGENTS.md \u2192 \u4F7F\u7528 `Edit` \u5DE5\u5177\u3002\u5982\u679C\u4E0D\u5B58\u5728 \u2192 \u4F7F\u7528 `Write` \u5DE5\u5177\u3002\n\u6C38\u8FDC\u4E0D\u8981\u4F7F\u7528 Write \u8986\u76D6\u73B0\u6709\u6587\u4EF6\u3002\u59CB\u7EC8\u5148\u901A\u8FC7 `Read` \u6216\u53D1\u73B0\u7ED3\u679C\u68C0\u67E5\u5B58\u5728\u6027\u3002\n</critical>\n\n### \u6839\u76EE\u5F55 AGENTS.md (\u5B8C\u6574\u5904\u7406)\n\n```markdown\n# PROJECT KNOWLEDGE BASE / \u9879\u76EE\u77E5\u8BC6\u5E93\n\n**Generated / \u751F\u6210\u65F6\u95F4:** {TIMESTAMP}\n**Commit:** {SHORT_SHA}\n**Branch:** {BRANCH}\n\n## OVERVIEW / \u6982\u89C8\n{1-2 sentences: what + core stack / 1-2 \u53E5\u8BDD: \u662F\u4EC0\u4E48 + \u6838\u5FC3\u6280\u672F\u6808}\n\n## STRUCTURE / \u7ED3\u6784\n\\`\\`\\`\n{root}/\n\u251C\u2500\u2500 {dir}/ # {non-obvious purpose only / \u4EC5\u4E0D\u660E\u663E\u7684\u76EE\u7684}\n\u2514\u2500\u2500 {entry}\n\\`\\`\\`\n\n## WHERE TO LOOK / \u67E5\u627E\u4F4D\u7F6E\n| Task / \u4EFB\u52A1 | Location / \u4F4D\u7F6E | Notes / \u5907\u6CE8 |\n|------|----------|-------\n\n## CODE MAP / \u4EE3\u7801\u5730\u56FE\n{From LSP - skip if unavailable or project <10 files / \u6765\u81EA LSP - \u5982\u679C\u4E0D\u53EF\u7528\u6216\u9879\u76EE <10 \u4E2A\u6587\u4EF6\u5219\u8DF3\u8FC7}\n\n| Symbol / \u7B26\u53F7 | Type / \u7C7B\u578B | Location / \u4F4D\u7F6E | Refs / \u5F15\u7528 | Role / \u89D2\u8272 |\n|--------|------|----------|------|------\n\n## CONVENTIONS / \u7EA6\u5B9A\n{ONLY deviations from standard / \u4EC5\u4E0E\u6807\u51C6\u7684\u504F\u79BB}\n\n## ANTI-PATTERNS (THIS PROJECT) / \u53CD\u6A21\u5F0F (\u672C\u9879\u76EE)\n{Explicitly forbidden here / \u660E\u786E\u7981\u6B62\u7684}\n\n## UNIQUE STYLES / \u72EC\u7279\u98CE\u683C\n{Project-specific / \u9879\u76EE\u7279\u5B9A}\n\n## COMMANDS / \u547D\u4EE4\n\\`\\`\\`bash\n{dev/test/build}\n\\`\\`\\`\n\n## NOTES / \u5907\u6CE8\n{Gotchas / \u9677\u9631}\n```\n\n**\u8D28\u91CF\u95E8\u69DB**: 50-150 \u884C\uFF0C\u65E0\u901A\u7528\u5EFA\u8BAE\uFF0C\u65E0\u660E\u663E\u4FE1\u606F\u3002\n\n### \u5B50\u76EE\u5F55 AGENTS.md (\u5E76\u884C)\n\n\u4E3A\u6BCF\u4E2A\u4F4D\u7F6E\u542F\u52A8\u5199\u5165\u4EFB\u52A1:\n\n```\nfor loc in AGENTS_LOCATIONS (except root):\n task(category=\"writing\", load_skills=[], run_in_background=false, description=\"Generate AGENTS.md\", prompt=\\`\n Generate AGENTS.md for: ${loc.path}\n - Reason / \u539F\u56E0: ${loc.reason}\n - 30-80 lines max / \u6700\u591A 30-80 \u884C\n - NEVER repeat parent content / \u6C38\u8FDC\u4E0D\u8981\u91CD\u590D\u7236\u7EA7\u5185\u5BB9\n - Sections / \u90E8\u5206: OVERVIEW (1 line / 1 \u884C), STRUCTURE (if >5 subdirs / \u5982\u679C >5 \u4E2A\u5B50\u76EE\u5F55), WHERE TO LOOK, CONVENTIONS (if different / \u5982\u679C\u4E0D\u540C), ANTI-PATTERNS\n \\`)\n```\n\n**\u7B49\u5F85\u6240\u6709\u5B8C\u6210\u3002\u5C06 \"generate\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## Phase 4: \u5BA1\u67E5\u548C\u53BB\u91CD\n\n**\u5C06 \"review\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n\u5BF9\u4E8E\u6BCF\u4E2A\u751F\u6210\u7684\u6587\u4EF6:\n- \u79FB\u9664\u901A\u7528\u5EFA\u8BAE\n- \u79FB\u9664\u7236\u7EA7\u91CD\u590D\u5185\u5BB9\n- \u4FEE\u526A\u5230\u5927\u5C0F\u9650\u5236\n- \u9A8C\u8BC1\u7535\u62A5\u5F0F\u98CE\u683C\n\n**\u5C06 \"review\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## \u6700\u7EC8\u62A5\u544A\n\n```\n=== init-deep Complete ===\n\nMode / \u6A21\u5F0F: {update | create-new}\n\nFiles / \u6587\u4EF6:\n [OK] ./AGENTS.md (root, {N} lines / {N} \u884C)\n [OK] ./src/hooks/AGENTS.md ({N} lines / {N} \u884C)\n\nDirs Analyzed / \u5206\u6790\u7684\u76EE\u5F55: {N}\nAGENTS.md Created / \u521B\u5EFA\u7684 AGENTS.md: {N}\nAGENTS.md Updated / \u66F4\u65B0\u7684 AGENTS.md: {N}\n\nHierarchy / \u5C42\u6B21\u7ED3\u6784:\n ./AGENTS.md\n \u2514\u2500\u2500 src/hooks/AGENTS.md\n```\n\n---\n\n## \u53CD\u6A21\u5F0F / Anti-Patterns\n\n- **\u9759\u6001 agent \u6570\u91CF**: \u5FC5\u987B\u6839\u636E\u9879\u76EE\u89C4\u6A21/\u6DF1\u5EA6\u53D8\u5316 agents\n- **\u987A\u5E8F\u6267\u884C**: \u5FC5\u987B\u5E76\u884C (explore + LSP \u5E76\u53D1)\n- **\u5FFD\u7565\u73B0\u6709\u7684**: \u59CB\u7EC8\u5148\u8BFB\u53D6\u73B0\u6709\u7684\uFF0C\u5373\u4F7F\u4F7F\u7528 --create-new\n- **\u8FC7\u5EA6\u6587\u6863\u5316**: \u4E0D\u662F\u6BCF\u4E2A\u76EE\u5F55\u90FD\u9700\u8981 AGENTS.md\n- **\u5197\u4F59**: \u5B50\u7EA7\u6C38\u8FDC\u4E0D\u91CD\u590D\u7236\u7EA7\n- **\u901A\u7528\u5185\u5BB9**: \u79FB\u9664\u9002\u7528\u4E8E\u6240\u6709\u9879\u76EE\u7684\u5185\u5BB9\n- **\u5197\u957F\u98CE\u683C**: \u7535\u62A5\u5F0F\u6216\u6B7B\u4EA1";
1
+ export declare const INIT_DEEP_TEMPLATE = "# /init-deep\n\nGenerate hierarchical AGENTS.md files. Root + complexity-scored subdirectories.\n\n## Usage\n\n```\n/init-deep # Update mode: modify existing + create new where warranted\n/init-deep --create-new # Read existing \u2192 remove all \u2192 regenerate from scratch\n/init-deep --max-depth=2 # Limit directory depth (default: 3)\n```\n\n---\n\n## Workflow (High-Level)\n\n1. **Discovery + Analysis** (concurrent)\n - Fire background explore agents immediately\n - Main session: bash structure + LSP codemap + read existing AGENTS.md\n2. **Score & Decide** - Determine AGENTS.md locations from merged findings\n3. **Generate** - Root first, then subdirs in parallel\n4. **Review** - Deduplicate, trim, validate\n\n<critical>\n**TodoWrite ALL phases. Mark in_progress \u2192 completed in real-time.**\n```\nTodoWrite([\n { id: \"discovery\", content: \"Fire explore agents + LSP codemap + read existing\", status: \"pending\", priority: \"high\" },\n { id: \"scoring\", content: \"Score directories, determine locations\", status: \"pending\", priority: \"high\" },\n { id: \"generate\", content: \"Generate AGENTS.md files (root + subdirs)\", status: \"pending\", priority: \"high\" },\n { id: \"review\", content: \"Deduplicate, validate, trim\", status: \"pending\", priority: \"medium\" }\n])\n```\n</critical>\n\n---\n\n## Phase 1: Discovery + Analysis (Concurrent)\n\n**Mark \"discovery\" as in_progress.**\n\n### Fire Background Explore Agents IMMEDIATELY\n\nDon't wait-these run async while main session works.\n\n```\n// Fire all at once, collect results later\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore project structure\", run_in_background=true, prompt=\"Project structure: PREDICT standard patterns for detected language \u2192 REPORT deviations only\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find entry points\", run_in_background=true, prompt=\"Entry points: FIND main files \u2192 REPORT non-standard organization\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find conventions\", run_in_background=true, prompt=\"Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) \u2192 REPORT project-specific rules\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find anti-patterns\", run_in_background=true, prompt=\"Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments \u2192 LIST forbidden patterns\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore build/CI\", run_in_background=true, prompt=\"Build/CI: FIND .github/workflows, Makefile \u2192 REPORT non-standard patterns\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find test patterns\", run_in_background=true, prompt=\"Test patterns: FIND test configs, test structure \u2192 REPORT unique conventions\")\n```\n\n<dynamic-agents>\n**DYNAMIC AGENT SPAWNING**: After bash analysis, spawn ADDITIONAL explore agents based on project scale:\n\n| Factor | Threshold | Additional Agents |\n|--------|-----------|-------------------|\n| **Total files** | >100 | +1 per 100 files |\n| **Total lines** | >10k | +1 per 10k lines |\n| **Directory depth** | \u22654 | +2 for deep exploration |\n| **Large files (>500 lines)** | >10 files | +1 for complexity hotspots |\n| **Monorepo** | detected | +1 per package/workspace |\n| **Multiple languages** | >1 | +1 per language |\n\n```bash\n# Measure project scale first\ntotal_files=$(find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | wc -l)\ntotal_lines=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" -o -name \"*.go\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print $1}')\nlarge_files=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {count++} END {print count+0}')\nmax_depth=$(find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' | awk -F/ '{print NF}' | sort -rn | head -1)\n```\n\nExample spawning:\n```\n// 500 files, 50k lines, depth 6, 15 large files \u2192 spawn 5+5+2+1 = 13 additional agents\ntask(subagent_type=\"explore\", load_skills=[], description=\"Analyze large files\", run_in_background=true, prompt=\"Large file analysis: FIND files >500 lines, REPORT complexity hotspots\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore deep modules\", run_in_background=true, prompt=\"Deep modules at depth 4+: FIND hidden patterns, internal conventions\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find shared utilities\", run_in_background=true, prompt=\"Cross-cutting concerns: FIND shared utilities across directories\")\n// ... more based on calculation\n```\n</dynamic-agents>\n\n### Main Session: Concurrent Analysis\n\n**While background agents run**, main session does:\n\n#### 1. Bash Structural Analysis\n```bash\n# Directory depth + file counts\nfind . -type d -not -path '*/\\.*' -not -path '*/node_modules/*' -not -path '*/venv/*' -not -path '*/dist/*' -not -path '*/build/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c\n\n# Files per directory (top 30)\nfind . -type f -not -path '*/\\.*' -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30\n\n# Code concentration by extension\nfind . -type f \\( -name \"*.py\" -o -name \"*.ts\" -o -name \"*.tsx\" -o -name \"*.js\" -o -name \"*.go\" -o -name \"*.rs\" \\) -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20\n\n# Existing AGENTS.md / CLAUDE.md\nfind . -type f \\( -name \"AGENTS.md\" -o -name \"CLAUDE.md\" \\) -not -path '*/node_modules/*' 2>/dev/null\n```\n\n#### 2. Read Existing AGENTS.md\n```\nFor each existing file found:\n Read(filePath=file)\n Extract: key insights, conventions, anti-patterns\n Store in EXISTING_AGENTS map\n```\n\nIf `--create-new`: Read all existing first (preserve context) \u2192 then delete all \u2192 regenerate.\n\n#### 3. LSP Codemap (if available)\n```\nLspServers() # Check availability\n\n# Entry points (parallel)\nLspDocumentSymbols(filePath=\"src/index.ts\")\nLspDocumentSymbols(filePath=\"main.py\")\n\n# Key symbols (parallel)\nLspWorkspaceSymbols(filePath=\".\", query=\"class\")\nLspWorkspaceSymbols(filePath=\".\", query=\"interface\")\nLspWorkspaceSymbols(filePath=\".\", query=\"function\")\n\n# Centrality for top exports\nLspFindReferences(filePath=\"...\", line=X, character=Y)\n```\n\n**LSP Fallback**: If unavailable, rely on explore agents + AST-grep.\n\n### Collect Background Results\n\n```\n// After main session analysis done, collect all task results\nfor each task_id: background_output(task_id=\"...\")\n```\n\n**Merge: bash + LSP + existing + explore findings. Mark \"discovery\" as completed.**\n\n---\n\n## Phase 2: Scoring & Location Decision\n\n**Mark \"scoring\" as in_progress.**\n\n### Scoring Matrix\n\n| Factor | Weight | High Threshold | Source |\n|--------|--------|----------------|--------|\n| File count | 3x | >20 | bash |\n| Subdir count | 2x | >5 | bash |\n| Code ratio | 2x | >70% | bash |\n| Unique patterns | 1x | Has own config | explore |\n| Module boundary | 2x | Has index.ts/__init__.py | bash |\n| Symbol density | 2x | >30 symbols | LSP |\n| Export count | 2x | >10 exports | LSP |\n| Reference centrality | 3x | >20 refs | LSP |\n\n### Decision Rules\n\n| Score | Action |\n|-------|--------|\n| **Root (.)** | ALWAYS create |\n| **>15** | Create AGENTS.md |\n| **8-15** | Create if distinct domain |\n| **<8** | Skip (parent covers) |\n\n### Output\n```\nAGENTS_LOCATIONS = [\n { path: \".\", type: \"root\" },\n { path: \"src/hooks\", score: 18, reason: \"high complexity\" },\n { path: \"src/api\", score: 12, reason: \"distinct domain\" }\n]\n```\n\n**Mark \"scoring\" as completed.**\n\n---\n\n## Phase 3: Generate AGENTS.md\n\n**Mark \"generate\" as in_progress.**\n\n<critical>\n**File Writing Rule**: If AGENTS.md already exists at the target path \u2192 use `Edit` tool. If it does NOT exist \u2192 use `Write` tool.\nNEVER use Write to overwrite an existing file. ALWAYS check existence first via `Read` or discovery results.\n</critical>\n\n### Root AGENTS.md (Full Treatment)\n\n```markdown\n# PROJECT KNOWLEDGE BASE\n\n**Generated:** {TIMESTAMP}\n**Commit:** {SHORT_SHA}\n**Branch:** {BRANCH}\n\n## OVERVIEW\n{1-2 sentences: what + core stack}\n\n## STRUCTURE\n\\`\\`\\`\n{root}/\n\u251C\u2500\u2500 {dir}/ # {non-obvious purpose only}\n\u2514\u2500\u2500 {entry}\n\\`\\`\\`\n\n## WHERE TO LOOK\n| Task | Location | Notes |\n|------|----------|-------|\n\n## CODE MAP\n{From LSP - skip if unavailable or project <10 files}\n\n| Symbol | Type | Location | Refs | Role |\n|--------|------|----------|------|------|\n\n## CONVENTIONS\n{ONLY deviations from standard}\n\n## ANTI-PATTERNS (THIS PROJECT)\n{Explicitly forbidden here}\n\n## UNIQUE STYLES\n{Project-specific}\n\n## COMMANDS\n\\`\\`\\`bash\n{dev/test/build}\n\\`\\`\\`\n\n## NOTES\n{Gotchas}\n```\n\n**Quality gates**: 50-150 lines, no generic advice, no obvious info.\n\n### Subdirectory AGENTS.md (Parallel)\n\nLaunch writing tasks for each location:\n\n```\nfor loc in AGENTS_LOCATIONS (except root):\n task(category=\"writing\", load_skills=[], run_in_background=false, description=\"Generate AGENTS.md\", prompt=\\`\n Generate AGENTS.md for: ${loc.path}\n - Reason: ${loc.reason}\n - 30-80 lines max\n - NEVER repeat parent content\n - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS\n \\`)\n```\n\n**Wait for all. Mark \"generate\" as completed.**\n\n---\n\n## Phase 4: Review & Deduplicate\n\n**Mark \"review\" as in_progress.**\n\nFor each generated file:\n- Remove generic advice\n- Remove parent duplicates\n- Trim to size limits\n- Verify telegraphic style\n\n**Mark \"review\" as completed.**\n\n---\n\n## Final Report\n\n```\n=== init-deep Complete ===\n\nMode: {update | create-new}\n\nFiles:\n [OK] ./AGENTS.md (root, {N} lines)\n [OK] ./src/hooks/AGENTS.md ({N} lines)\n\nDirs Analyzed: {N}\nAGENTS.md Created: {N}\nAGENTS.md Updated: {N}\n\nHierarchy:\n ./AGENTS.md\n \u2514\u2500\u2500 src/hooks/AGENTS.md\n```\n\n---\n\n## Anti-Patterns\n\n- **Static agent count**: MUST vary agents based on project size/depth\n- **Sequential execution**: MUST parallel (explore + LSP concurrent)\n- **Ignoring existing**: ALWAYS read existing first, even with --create-new\n- **Over-documenting**: Not every dir needs AGENTS.md\n- **Redundancy**: Child never repeats parent\n- **Generic content**: Remove anything that applies to ALL projects\n- **Verbose style**: Telegraphic or die";
@@ -1,3 +1,3 @@
1
- export declare const RALPH_LOOP_TEMPLATE = "\u4F60\u6B63\u5728\u542F\u52A8 Ralph Loop - \u4E00\u4E2A\u81EA\u5F15\u7528\u5F00\u53D1\u5FAA\u73AF\uFF0C\u8FD0\u884C\u76F4\u5230\u4EFB\u52A1\u5B8C\u6210\u3002\n\n## Ralph Loop \u5982\u4F55\u5DE5\u4F5C\n\n1. \u4F60\u5C06\u6301\u7EED\u5730\u5904\u7406\u4EFB\u52A1\n2. \u5F53\u4F60\u8BA4\u4E3A\u4EFB\u52A1\u5B8C\u5168\u5B8C\u6210\u65F6\uFF0C\u8F93\u51FA: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. \u5982\u679C\u4F60\u6CA1\u6709\u8F93\u51FA promise\uFF0C\u5FAA\u73AF\u5C06\u81EA\u52A8\u6CE8\u5165\u53E6\u4E00\u4E2A prompt \u4EE5\u7EE7\u7EED\n4. \u6700\u5927\u8FED\u4EE3\u6B21\u6570: \u53EF\u914D\u7F6E (\u9ED8\u8BA4 100)\n\n## \u89C4\u5219\n\n- \u4E13\u6CE8\u4E8E\u5B8C\u5168\u5B8C\u6210\u4EFB\u52A1\uFF0C\u800C\u4E0D\u662F\u90E8\u5206\u5B8C\u6210\n- \u5728\u4EFB\u52A1\u771F\u6B63\u5B8C\u6210\u4E4B\u524D\u4E0D\u8981\u8F93\u51FA\u5B8C\u6210 promise\n- \u6BCF\u6B21\u8FED\u4EE3\u90FD\u5E94\u8BE5\u5BF9\u76EE\u6807\u505A\u51FA\u6709\u610F\u4E49\u7684\u8FDB\u5C55\n- \u5982\u679C\u5361\u4F4F\u4E86\uFF0C\u5C1D\u8BD5\u4E0D\u540C\u7684\u65B9\u6CD5\n- \u4F7F\u7528 todos \u8FFD\u8E2A\u4F60\u7684\u8FDB\u5EA6\n\n## \u9000\u51FA\u6761\u4EF6\n\n1. **\u5B8C\u6210**: \u4EFB\u52A1\u5B8C\u5168\u5B8C\u6210\u65F6\u8F93\u51FA\u4F60\u7684\u5B8C\u6210 promise \u6807\u7B7E\n2. **\u6700\u5927\u8FED\u4EE3\u6B21\u6570**: \u5FAA\u73AF\u5728\u8FBE\u5230\u9650\u5236\u65F6\u81EA\u52A8\u505C\u6B62\n3. **\u53D6\u6D88**: \u7528\u6237\u8FD0\u884C `/cancel-ralph` \u547D\u4EE4\n\n## \u4F60\u7684\u4EFB\u52A1\n\n\u89E3\u6790\u4E0B\u9762\u7684\u53C2\u6570\u5E76\u5F00\u59CB\u5904\u7406\u4EFB\u52A1\u3002\u683C\u5F0F\u662F:\n`\"task description\" [--completion-promise=TEXT] [--max-iterations=N] [--strategy=reset|continue]`\n\n\u9ED8\u8BA4\u5B8C\u6210 promise \u662F \"DONE\"\uFF0C\u9ED8\u8BA4\u6700\u5927\u8FED\u4EE3\u6B21\u6570\u662F 100\u3002";
2
- export declare const ULW_LOOP_TEMPLATE = "\u4F60\u6B63\u5728\u542F\u52A8 ULTRAWORK Loop - \u4E00\u4E2A\u81EA\u5F15\u7528\u5F00\u53D1\u5FAA\u73AF\uFF0C\u8FD0\u884C\u76F4\u5230\u9A8C\u8BC1\u5B8C\u6210\u3002\n\n## ULTRAWORK Loop \u5982\u4F55\u5DE5\u4F5C\n\n1. \u4F60\u5C06\u6301\u7EED\u5730\u5904\u7406\u4EFB\u52A1\n2. \u5F53\u4F60\u8BA4\u4E3A\u5DE5\u4F5C\u5B8C\u6210\u65F6\uFF0C\u8F93\u51FA: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. \u8FD9\u8FD8\u4E0D\u4F1A\u7ED3\u675F\u5FAA\u73AF\u3002\u7CFB\u7EDF\u5C06\u8981\u6C42 Oracle \u9A8C\u8BC1\n4. \u5FAA\u73AF\u53EA\u5728\u7CFB\u7EDF\u786E\u8BA4 Oracle \u9A8C\u8BC1\u4E86\u7ED3\u679C\u540E\u624D\u7ED3\u675F\n5. \u6CA1\u6709\u8FED\u4EE3\u6B21\u6570\u9650\u5236\n\n## \u89C4\u5219\n\n- \u4E13\u6CE8\u4E8E\u5B8C\u5168\u5B8C\u6210\u4EFB\u52A1\n- \u5728\u4F60\u53D1\u51FA\u5B8C\u6210 promise \u540E\uFF0C\u5F53\u88AB\u6307\u793A\u65F6\u8FD0\u884C Oracle \u9A8C\u8BC1\n- \u5728 Oracle \u9A8C\u8BC1\u4E4B\u524D\uFF0C\u4E0D\u8981\u5C06 DONE \u89C6\u4E3A\u6700\u7EC8\u5B8C\u6210\n\n## \u9000\u51FA\u6761\u4EF6\n\n1. **\u9A8C\u8BC1\u5B8C\u6210**: Oracle \u9A8C\u8BC1\u4E86\u7ED3\u679C\u4E14\u7CFB\u7EDF\u786E\u8BA4\n2. **\u53D6\u6D88**: \u7528\u6237\u8FD0\u884C `/cancel-ralph`\n\n## \u4F60\u7684\u4EFB\u52A1\n\n\u89E3\u6790\u4E0B\u9762\u7684\u53C2\u6570\u5E76\u5F00\u59CB\u5904\u7406\u4EFB\u52A1\u3002\u683C\u5F0F\u662F:\n`\"task description\" [--completion-promise=TEXT] [--strategy=reset|continue]`\n\n\u9ED8\u8BA4\u5B8C\u6210 promise \u662F \"DONE\"\u3002";
3
- export declare const CANCEL_RALPH_TEMPLATE = "\u53D6\u6D88\u5F53\u524D\u6D3B\u52A8\u7684 Ralph Loop\u3002\n\n\u8FD9\u5C06:\n1. \u505C\u6B62\u5FAA\u73AF\u7EE7\u7EED\n2. \u6E05\u9664\u5FAA\u73AF\u72B6\u6001\u6587\u4EF6\n3. \u5141\u8BB8\u4F1A\u8BDD\u6B63\u5E38\u7ED3\u675F\n\n\u68C0\u67E5\u5FAA\u73AF\u662F\u5426\u6D3B\u52A8\u5E76\u53D6\u6D88\u5B83\u3002\u901A\u77E5\u7528\u6237\u7ED3\u679C\u3002";
1
+ export declare const RALPH_LOOP_TEMPLATE = "You are starting a Ralph Loop - a self-referential development loop that runs until task completion.\n\n## How Ralph Loop Works\n\n1. You will work on the task continuously\n2. When you believe the task is FULLY complete, output: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. If you don't output the promise, the loop will automatically inject another prompt to continue\n4. Maximum iterations: Configurable (default 100)\n\n## Rules\n\n- Focus on completing the task fully, not partially\n- Don't output the completion promise until the task is truly done\n- Each iteration should make meaningful progress toward the goal\n- If stuck, try different approaches\n- Use todos to track your progress\n\n## Exit Conditions\n\n1. **Completion**: Output your completion promise tag when fully complete\n2. **Max Iterations**: Loop stops automatically at limit\n3. **Cancel**: User runs `/cancel-ralph` command\n\n## Your Task\n\nParse the arguments below and begin working on the task. The format is:\n`\"task description\" [--completion-promise=TEXT] [--max-iterations=N] [--strategy=reset|continue]`\n\nDefault completion promise is \"DONE\" and default max iterations is 100.";
2
+ export declare const ULW_LOOP_TEMPLATE = "You are starting an ULTRAWORK Loop - a self-referential development loop that runs until verified completion.\n\n## How ULTRAWORK Loop Works\n\n1. You will work on the task continuously\n2. When you believe the work is complete, output: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. That does NOT finish the loop yet. The system will require Oracle verification\n4. The loop only ends after the system confirms Oracle verified the result\n5. The iteration limit is 500 for ultrawork mode, 100 for normal mode\n\n## Rules\n\n- Focus on finishing the task completely\n- After you emit the completion promise, run Oracle verification when instructed\n- Do not treat DONE as final completion until Oracle verifies it\n\n## Exit Conditions\n\n1. **Verified Completion**: Oracle verifies the result and the system confirms it\n2. **Cancel**: User runs `/cancel-ralph`\n\n## Your Task\n\nParse the arguments below and begin working on the task. The format is:\n`\"task description\" [--completion-promise=TEXT] [--strategy=reset|continue]`\n\nDefault completion promise is \"DONE\".";
3
+ export declare const CANCEL_RALPH_TEMPLATE = "Cancel the currently active Ralph Loop.\n\nThis will:\n1. Stop the loop from continuing\n2. Clear the loop state file\n3. Allow the session to end normally\n\nCheck if a loop is active and cancel it. Inform the user of the result.";
@@ -0,0 +1 @@
1
+ export declare const REMOVE_AI_SLOPS_TEMPLATE = "# Remove AI Slops Command\n\n## What this command does\nAnalyzes all files changed in the current branch (compared to parent commit), removes AI-generated code smells in parallel, then critically reviews the changes to ensure safety and behavior preservation. Fixes any issues found during review.\n\n## Step 0: Task Planning\n\nUse TodoWrite to create the task list:\n1. Get changed files from branch\n2. Run ai-slop-remover on each file in parallel\n3. Critically review all changes\n4. Fix any issues found\n\n## Role Definition\nYou are a senior code quality engineer specialized in identifying and removing AI-generated code patterns while preserving original functionality. You have deep expertise in code review, refactoring safety, and behavioral preservation.\n\n## Process\n\n### Phase 1: Identify Changed Files\nDetect the repository base branch dynamically, then get all changed files in the current branch:\n```bash\nBASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo \"main\")\ngit diff $(git merge-base \"$BASE_BRANCH\" HEAD)..HEAD --name-only\n```\n\nIf `git symbolic-ref refs/remotes/origin/HEAD` is unavailable, detect the base branch at runtime using the repo's configured remote default branch. Only fall back to `main` as a last resort.\n\n### Phase 2: Parallel AI Slop Removal\nFor each changed file, spawn an agent in parallel using the Task tool with the ai-slop-remover skill:\n\n```\ntask(category=\"quick\", load_skills=[\"ai-slop-remover\"], run_in_background=true, description=\"Remove AI slops from {filename}\", prompt=\"Remove AI slops from: {file_path}\")\n```\n\n**CRITICAL**: Launch ALL agents in a SINGLE message with multiple Task tool calls for maximum parallelism.\n\nBefore running ai-slop-remover on each file, save a file-specific rollback artifact that captures only the delta introduced by the slop-removal pass. Use a safe pattern such as generating a per-file patch and reverse-applying it if review fails.\n\nDo NOT use `git checkout -- {file_path}` or any rollback that discards pre-existing branch changes in the file.\n\n### Phase 3: Critical Review\nAfter all ai-slop-remover agents complete, perform a critical review with the following checklist:\n\n**Safety Verification**:\n- [ ] No functional logic was accidentally removed\n- [ ] All error handling is preserved\n- [ ] Type hints remain correct and complete\n- [ ] Import statements are still valid\n- [ ] No breaking changes to public APIs\n\n**Behavior Preservation**:\n- [ ] Return values unchanged\n- [ ] Side effects unchanged\n- [ ] Exception behavior unchanged\n- [ ] Edge case handling preserved\n\n**Code Quality**:\n- [ ] Removed changes are genuinely AI slop (not intentional patterns)\n- [ ] Remaining code follows project conventions\n- [ ] No orphaned code or dead references\n\n### Phase 4: Fix Issues\nIf any issues are found during critical review:\n1. Identify the specific problem\n2. Explain why it's a problem\n3. Revert only the ai-slop-remover delta using the saved per-file patch or an equivalent reverse-apply workflow\n4. If remaining ai-slops are found after reverting, remove them by editing the file yourself - with parallel tool calls, per-file\n5. Verify the fix doesn't introduce new issues\n\n## Output Format\n\n### Summary Report\n```\n## AI Slop Removal Summary\n\n### Files Processed\n- file1.py: X changes\n- file2.py: Y changes\n\n### Critical Review Results\n- Safety: PASS/FAIL\n- Behavior: PASS/FAIL\n- Quality: PASS/FAIL\n\n### Issues Found & Fixed\n1. [Issue description] -> [Fix applied]\n\n### Final Status\n[CLEAN / ISSUES FIXED / REQUIRES ATTENTION]\n```\n\n## Quality Assurance\n- NEVER remove code that serves a functional purpose\n- ALWAYS verify changes compile/parse correctly\n- ALWAYS preserve test coverage\n- If uncertain about a change, err on the side of keeping the original code";
@@ -1 +1 @@
1
- export declare const START_WORK_TEMPLATE = "\u4F60\u6B63\u5728\u542F\u52A8 Sisyphus \u5DE5\u4F5C\u4F1A\u8BDD\u3002\n\n## \u53C2\u6570 / ARGUMENTS\n\n- `/start-work [plan-name] [--worktree <path>]`\n - `plan-name` (\u53EF\u9009): \u8981\u542F\u52A8\u7684\u8BA1\u5212\u540D\u79F0\u6216\u90E8\u5206\u5339\u914D\n - `--worktree <path>` (\u53EF\u9009): \u8981\u5DE5\u4F5C\u7684\u73B0\u6709 git worktree \u7684\u7EDD\u5BF9\u8DEF\u5F84\n - \u5982\u679C\u6307\u5B9A\u4E14\u6709\u6548: hook \u9884\u8BBE\u5728 boulder.json \u4E2D\u8BBE\u7F6E worktree_path\n - \u5982\u679C\u6307\u5B9A\u4F46\u65E0\u6548: \u4F60\u5FC5\u987B\u5148\u8FD0\u884C `git worktree add <path> <branch>`\n - \u5982\u679C\u7701\u7565: \u76F4\u63A5\u5728\u5F53\u524D\u9879\u76EE\u76EE\u5F55\u4E2D\u5DE5\u4F5C (\u65E0 worktree)\n\n## \u505A\u4EC0\u4E48 / WHAT TO DO\n\n1. **\u627E\u5230\u53EF\u7528\u7684\u8BA1\u5212**: \u5728 `.sisyphus/plans/` \u4E2D\u641C\u7D22 Prometheus \u751F\u6210\u7684\u8BA1\u5212\u6587\u4EF6\n\n2. **\u68C0\u67E5\u6D3B\u52A8\u7684 boulder \u72B6\u6001**: \u5982\u679C\u5B58\u5728\uFF0C\u8BFB\u53D6 `.sisyphus/boulder.json`\n\n3. **\u51B3\u7B56\u903B\u8F91**:\n - \u5982\u679C `.sisyphus/boulder.json` \u5B58\u5728\u4E14\u8BA1\u5212\u672A\u5B8C\u6210 (\u6709\u672A\u52FE\u9009\u6846):\n - **\u8FFD\u52A0**\u5F53\u524D\u4F1A\u8BDD\u5230 session_ids\n - \u7EE7\u7EED\u5904\u7406\u73B0\u6709\u8BA1\u5212\n - \u5982\u679C\u6CA1\u6709\u6D3B\u52A8\u8BA1\u5212\u6216\u8BA1\u5212\u5DF2\u5B8C\u6210:\n - \u5217\u51FA\u53EF\u7528\u7684\u8BA1\u5212\u6587\u4EF6\n - \u5982\u679C\u53EA\u6709\u4E00\u4E2A\u8BA1\u5212: \u81EA\u52A8\u9009\u62E9\u5B83\n - \u5982\u679C\u6709\u591A\u4E2A\u8BA1\u5212: \u663E\u793A\u5E26\u65F6\u95F4\u6233\u7684\u5217\u8868\uFF0C\u8BA9\u7528\u6237\u9009\u62E9\n\n4. **Worktree \u8BBE\u7F6E** (\u4EC5\u5F53\u660E\u786E\u6307\u5B9A\u4E86 `--worktree` \u4E14 boulder.json \u4E2D\u5C1A\u672A\u8BBE\u7F6E `worktree_path` \u65F6):\n 1. `git worktree list --porcelain` \u2014 \u67E5\u770B\u53EF\u7528\u7684 worktrees\n 2. \u521B\u5EFA: `git worktree add <absolute-path> <branch-or-HEAD>`\n 3. \u66F4\u65B0 boulder.json \u6DFB\u52A0 `\"worktree_path\": \"<absolute-path>\"`\n 4. \u6240\u6709\u5DE5\u4F5C\u90FD\u5728\u8BE5 worktree \u76EE\u5F55\u5185\u8FDB\u884C\n\n5. **\u521B\u5EFA/\u66F4\u65B0 boulder.json**:\n ```json\n {\n \"active_plan\": \"/absolute/path/to/plan.md\",\n \"started_at\": \"ISO_TIMESTAMP\",\n \"session_ids\": [\"session_id_1\", \"session_id_2\"],\n \"plan_name\": \"plan-name\",\n \"worktree_path\": \"/absolute/path/to/git/worktree\"\n }\n ```\n\n6. **\u8BFB\u53D6\u8BA1\u5212\u6587\u4EF6** \u5E76\u6839\u636E atlas \u5DE5\u4F5C\u6D41\u7A0B\u5F00\u59CB\u6267\u884C\u4EFB\u52A1\n\n## \u8F93\u51FA\u683C\u5F0F / OUTPUT FORMAT\n\n\u5217\u51FA\u8BA1\u5212\u4F9B\u9009\u62E9\u65F6:\n```\nAvailable Work Plans / \u53EF\u7528\u7684\u5DE5\u4F5C\u8BA1\u5212\n\nCurrent Time / \u5F53\u524D\u65F6\u95F4: {ISO timestamp}\nSession ID: {current session id}\n\n1. [plan-name-1.md] - Modified / \u4FEE\u6539: {date} - Progress / \u8FDB\u5EA6: 3/10 tasks\n2. [plan-name-2.md] - Modified / \u4FEE\u6539: {date} - Progress / \u8FDB\u5EA6: 0/5 tasks\n\n\u4F60\u60F3\u5904\u7406\u54EA\u4E2A\u8BA1\u5212\uFF1F(\u8F93\u5165\u7F16\u53F7\u6216\u8BA1\u5212\u540D\u79F0)\n```\n\n\u6062\u590D\u73B0\u6709\u5DE5\u4F5C\u65F6:\n```\nResuming Work Session / \u6062\u590D\u5DE5\u4F5C\u4F1A\u8BDD\n\nActive Plan / \u6D3B\u52A8\u8BA1\u5212: {plan-name}\nProgress / \u8FDB\u5EA6: {completed}/{total} tasks\nSessions: {count} (appending current session / \u8FFD\u52A0\u5F53\u524D\u4F1A\u8BDD)\nWorktree: {worktree_path}\n\nReading plan and continuing from last incomplete task... / \u8BFB\u53D6\u8BA1\u5212\u5E76\u4ECE\u6700\u540E\u4E00\u4E2A\u672A\u5B8C\u6210\u7684\u4EFB\u52A1\u7EE7\u7EED...\n```\n\n\u81EA\u52A8\u9009\u62E9\u5355\u4E2A\u8BA1\u5212\u65F6:\n```\nStarting Work Session / \u542F\u52A8\u5DE5\u4F5C\u4F1A\u8BDD\n\nPlan: {plan-name}\nSession ID: {session_id}\nStarted / \u5F00\u59CB: {timestamp}\nWorktree: {worktree_path}\n\nReading plan and beginning execution... / \u8BFB\u53D6\u8BA1\u5212\u5E76\u5F00\u59CB\u6267\u884C...\n```\n\n## \u5173\u952E / CRITICAL\n\n- session_id \u7531 hook \u6CE8\u5165 - \u76F4\u63A5\u4F7F\u7528\u5B83\n- \u5728\u5F00\u59CB\u5DE5\u4F5C\u4E4B\u524D\u59CB\u7EC8\u66F4\u65B0 boulder.json\n- \u5982\u679C boulder.json \u4E2D\u8BBE\u7F6E\u4E86 worktree_path\uFF0C\u6240\u6709\u5DE5\u4F5C\u90FD\u5728\u8BE5 worktree \u76EE\u5F55\u5185\u8FDB\u884C\n- \u5728\u59D4\u6258\u4EFB\u4F55\u4EFB\u52A1\u4E4B\u524D\u8BFB\u53D6\u5B8C\u6574\u7684\u8BA1\u5212\u6587\u4EF6\n- \u9075\u5FAA atlas \u59D4\u6258\u534F\u8BAE (7 \u90E8\u5206\u683C\u5F0F)\n\n## \u4EFB\u52A1\u5206\u89E3 (\u5F3A\u5236) / TASK BREAKDOWN (MANDATORY)\n\n\u8BFB\u53D6\u8BA1\u5212\u6587\u4EF6\u540E\uFF0C\u4F60\u5FC5\u987B\u5C06\u6BCF\u4E2A\u8BA1\u5212\u4EFB\u52A1\u5206\u89E3\u4E3A\u7C92\u5316\u7684\u3001\u5B9E\u73B0\u7EA7\u522B\u7684\u5B50\u6B65\u9AA4\uFF0C\u5E76\u5728\u5F00\u59CB\u4EFB\u4F55\u5DE5\u4F5C\u4E4B\u524D\u5C06\u6240\u6709\u8FD9\u4E9B\u6CE8\u518C\u4E3A task/todo \u9879\u3002\n\n**\u5982\u4F55\u5206\u89E3**:\n- \u6BCF\u4E2A\u8BA1\u5212\u590D\u9009\u6846\u9879 (\u4F8B\u5982 `- [ ] Add user authentication`) \u5FC5\u987B\u62C6\u5206\u4E3A\u5177\u4F53\u7684\u3001\u53EF\u64CD\u4F5C\u7684\u5B50\u4EFB\u52A1\n- \u5B50\u4EFB\u52A1\u5E94\u8BE5\u8DB3\u591F\u5177\u4F53\uFF0C\u6BCF\u4E2A\u4EFB\u52A1\u90FD\u6D89\u53CA\u4E00\u7EC4\u6E05\u6670\u7684\u6587\u4EF6/\u51FD\u6570\n- \u5305\u542B: \u8981\u4FEE\u6539\u7684\u6587\u4EF6\u3001\u8981\u66F4\u6539\u4EC0\u4E48\u3001\u9884\u671F\u884C\u4E3A\u4EE5\u53CA\u5982\u4F55\u9A8C\u8BC1\n- \u4E0D\u8981\u7559\u4E0B\u4EFB\u4F55\u6A21\u7CCA\u7684\u4EFB\u52A1 \u2014 \"\u5B9E\u73B0\u529F\u80FD X\"\u662F\u4E0D\u53EF\u63A5\u53D7\u7684\uFF1B\"\u5728 src/auth/middleware.ts \u4E2D\u6DFB\u52A0 validateToken() \u68C0\u67E5 JWT \u8FC7\u671F\u5E76\u8FD4\u56DE 401\" \u662F\u53EF\u63A5\u53D7\u7684\n\n**\u5206\u89E3\u793A\u4F8B**:\n\u8BA1\u5212\u4EFB\u52A1: `- [ ] Add rate limiting to API`\n\u2192 Todo \u9879:\n 1. \u521B\u5EFA `src/middleware/rate-limiter.ts` \u4F7F\u7528\u6ED1\u52A8\u7A97\u53E3\u7B97\u6CD5 (\u6BCF\u4E2A IP \u6700\u591A 100 req/min)\n 2. \u5728 `src/app.ts` \u8DEF\u7531\u5668\u94FE\u4E2D\u6DFB\u52A0 RateLimiter \u4E2D\u95F4\u4EF6\uFF0C\u5728 auth \u4E2D\u95F4\u4EF6\u4E4B\u524D\n 3. \u5728 `rate-limiter.ts` \u4E2D\u7684\u54CD\u5E94\u6DFB\u52A0\u901F\u7387\u9650\u5236\u5934 (X-RateLimit-Limit, X-RateLimit-Remaining)\n 4. \u6DFB\u52A0\u6D4B\u8BD5: \u5728 `src/middleware/rate-limiter.test.ts` \u4E2D\u9A8C\u8BC1\u8D85\u8FC7\u9650\u5236\u540E\u8FD4\u56DE 429\n 5. \u6DFB\u52A0\u6D4B\u8BD5: \u9A8C\u8BC1\u6B63\u5E38\u54CD\u5E94\u4E2D\u5B58\u5728\u5934\n\n\u5C06\u8FD9\u4E9B\u6CE8\u518C\u4E3A task/todo \u9879\uFF0C\u4EE5\u4FBF\u5728\u6574\u4E2A\u4F1A\u8BDD\u4E2D\u8FFD\u8E2A\u548C\u663E\u793A\u8FDB\u5EA6\u3002\n\n## WORKTREE \u5B8C\u6210 / WORKTREE COMPLETION\n\n\u5F53\u5728 worktree \u4E2D\u5DE5\u4F5C (`worktree_path` \u5728 boulder.json \u4E2D\u8BBE\u7F6E) \u4E14\u6240\u6709\u8BA1\u5212\u4EFB\u52A1\u5B8C\u6210\u65F6:\n1. \u5728 worktree \u4E2D\u63D0\u4EA4\u6240\u6709\u5269\u4F59\u66F4\u6539\n2. \u5207\u6362\u5230\u4E3B\u5DE5\u4F5C\u76EE\u5F55 (\u539F\u59CB repo\uFF0C\u4E0D\u662F worktree)\n3. \u5C06 worktree \u5206\u652F\u5408\u5E76\u5230\u5F53\u524D\u5206\u652F: `git merge <worktree-branch>`\n4. \u5982\u679C\u5408\u5E76\u6210\u529F\uFF0C\u6E05\u7406: `git worktree remove <worktree-path>`\n5. \u5220\u9664 boulder.json \u72B6\u6001\n\n\u8FD9\u662F\u4F7F\u7528 `--worktree` \u65F6\u7684\u9ED8\u8BA4\u884C\u4E3A\u3002\u53EA\u6709\u5728\u7528\u6237\u660E\u786E\u6307\u793A\u4E0D\u8FD9\u6837\u505A\u65F6\u624D\u8DF3\u8FC7\u5408\u5E76 (\u4F8B\u5982\uFF0C\u8981\u6C42\u521B\u5EFA PR \u800C\u4E0D\u662F)\u3002";
1
+ export declare const START_WORK_TEMPLATE = "You are starting a Sisyphus work session.\n\n## ARGUMENTS\n\n- `/start-work [plan-name] [--worktree <path>]`\n - `plan-name` (optional): name or partial match of the plan to start\n - `--worktree <path>` (optional): absolute path to an existing git worktree to work in\n - If specified and valid: hook pre-sets worktree_path in boulder.json\n - If specified but invalid: you must run `git worktree add <path> <branch>` first\n - If omitted: work directly in the current project directory (no worktree)\n\n## WHAT TO DO\n\n1. **Find available plans**: Search for Prometheus-generated plan files at `.sisyphus/plans/`\n\n2. **Check for active boulder state**: Read `.sisyphus/boulder.json` if it exists\n\n3. **Decision logic**:\n - If `.sisyphus/boulder.json` exists AND plan is NOT complete (has unchecked boxes):\n - **APPEND** current session to session_ids\n - Continue work on existing plan\n - If no active plan OR plan is complete:\n - List available plan files\n - If ONE plan: auto-select it\n - If MULTIPLE plans: show list with timestamps, ask user to select\n\n4. **Worktree Setup** (ONLY when `--worktree` was explicitly specified and `worktree_path` not already set in boulder.json):\n 1. `git worktree list --porcelain` - see available worktrees\n 2. Create: `git worktree add <absolute-path> <branch-or-HEAD>`\n 3. Update boulder.json to add `\"worktree_path\": \"<absolute-path>\"`\n 4. All work happens inside that worktree directory\n\n5. **Create/Update boulder.json**:\n ```json\n {\n \"active_plan\": \"/absolute/path/to/plan.md\",\n \"started_at\": \"ISO_TIMESTAMP\",\n \"session_ids\": [\"session_id_1\", \"session_id_2\"],\n \"plan_name\": \"plan-name\",\n \"worktree_path\": \"/absolute/path/to/git/worktree\"\n }\n ```\n\n6. **Read the plan file** and start executing tasks according to atlas workflow\n\n## OUTPUT FORMAT\n\nWhen listing plans for selection:\n```\nAvailable Work Plans\n\nCurrent Time: {ISO timestamp}\nSession ID: {current session id}\n\n1. [plan-name-1.md] - Modified: {date} - Progress: 3/10 tasks\n2. [plan-name-2.md] - Modified: {date} - Progress: 0/5 tasks\n\nWhich plan would you like to work on? (Enter number or plan name)\n```\n\nWhen resuming existing work:\n```\nResuming Work Session\n\nActive Plan: {plan-name}\nProgress: {completed}/{total} tasks\nSessions: {count} (appending current session)\nWorktree: {worktree_path}\n\nReading plan and continuing from last incomplete task...\n```\n\nWhen auto-selecting single plan:\n```\nStarting Work Session\n\nPlan: {plan-name}\nSession ID: {session_id}\nStarted: {timestamp}\nWorktree: {worktree_path}\n\nReading plan and beginning execution...\n```\n\n## CRITICAL\n\n- The session_id is injected by the hook - use it directly\n- Always update boulder.json BEFORE starting work\n- If worktree_path is set in boulder.json, all work happens inside that worktree directory\n- Read the FULL plan file before delegating any tasks\n- Follow atlas delegation protocols (7-section format)\n\n## TASK BREAKDOWN (MANDATORY)\n\nAfter reading the plan file, you MUST decompose every plan task into granular, implementation-level sub-steps and register ALL of them as task/todo items BEFORE starting any work.\n\n**How to break down**:\n- Each plan checkbox item (e.g., `- [ ] Add user authentication`) must be split into concrete, actionable sub-tasks\n- Sub-tasks should be specific enough that each one touches a clear set of files/functions\n- Include: file to modify, what to change, expected behavior, and how to verify\n- Do NOT leave any task vague - \"implement feature X\" is NOT acceptable; \"add validateToken() to src/auth/middleware.ts that checks JWT expiry and returns 401\" IS acceptable\n\n**Example breakdown**:\nPlan task: `- [ ] Add rate limiting to API`\n\u2192 Todo items:\n 1. Create `src/middleware/rate-limiter.ts` with sliding window algorithm (max 100 req/min per IP)\n 2. Add RateLimiter middleware to `src/app.ts` router chain, before auth middleware\n 3. Add rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining) to response in `rate-limiter.ts`\n 4. Add test: verify 429 response after exceeding limit in `src/middleware/rate-limiter.test.ts`\n 5. Add test: verify headers are present on normal responses\n\nRegister these as task/todo items so progress is tracked and visible throughout the session.\n\n## WORKTREE COMPLETION\n\nWhen working in a worktree (`worktree_path` is set in boulder.json) and ALL plan tasks are complete:\n1. Commit all remaining changes in the worktree\n2. **Sync .sisyphus state back**: Copy `.sisyphus/` from the worktree to the main repo before removal.\n This is CRITICAL when `.sisyphus/` is gitignored - state written during worktree execution would otherwise be lost.\n ```bash\n cp -r <worktree-path>/.sisyphus/* <main-repo>/.sisyphus/ 2>/dev/null || true\n ```\n3. Switch to the main working directory (the original repo, NOT the worktree)\n4. Merge the worktree branch into the current branch: `git merge <worktree-branch>`\n5. If merge succeeds, clean up: `git worktree remove <worktree-path>`\n6. Remove the boulder.json state\n\nThis is the DEFAULT behavior when `--worktree` was used. Skip merge only if the user explicitly instructs otherwise (e.g., asks to create a PR instead).";
@@ -1,5 +1,5 @@
1
1
  import type { CommandDefinition } from "../claude-code-command-loader";
2
- export type BuiltinCommandName = "init-deep" | "ralph-loop" | "cancel-ralph" | "ulw-loop" | "refactor" | "start-work" | "stop-continuation" | "handoff";
2
+ export type BuiltinCommandName = "init-deep" | "ralph-loop" | "cancel-ralph" | "ulw-loop" | "refactor" | "start-work" | "stop-continuation" | "handoff" | "remove-ai-slops";
3
3
  export interface BuiltinCommandConfig {
4
4
  disabled_commands?: BuiltinCommandName[];
5
5
  }
@@ -0,0 +1,2 @@
1
+ import type { BuiltinSkill } from "../types";
2
+ export declare const aiSlopRemoverSkill: BuiltinSkill;
@@ -0,0 +1 @@
1
+ export declare const GIT_MASTER_COMMIT_WORKFLOW_SECTION = "## PHASE 0: Parallel Context Gathering (MANDATORY FIRST STEP)\n\n<parallel_analysis>\n**Execute ALL of the following commands IN PARALLEL to minimize latency:**\n\n```bash\n# Group 1: Current state\ngit status\ngit diff --staged --stat\ngit diff --stat\n\n# Group 2: History context \ngit log -30 --oneline\ngit log -30 --pretty=format:\"%s\"\n\n# Group 3: Branch context\ngit branch --show-current\ngit merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null\ngit rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo \"NO_UPSTREAM\"\ngit log --oneline $(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null)..HEAD 2>/dev/null\n```\n\n**Capture these data points simultaneously:**\n1. What files changed (staged vs unstaged)\n2. Recent 30 commit messages for style detection\n3. Branch position relative to main/master\n4. Whether branch has upstream tracking\n5. Commits that would go in PR (local only)\n</parallel_analysis>\n\n---\n\n## PHASE 1: Style Detection (BLOCKING - MUST OUTPUT BEFORE PROCEEDING)\n\n<style_detection>\n**THIS PHASE HAS MANDATORY OUTPUT** - You MUST print the analysis result before moving to Phase 2.\n\n### 1.1 Language Detection\n\n```\nCount from git log -30:\n- Korean characters: N commits\n- English only: M commits\n- Mixed: K commits\n\nDECISION:\n- If Korean >= 50% -> KOREAN\n- If English >= 50% -> ENGLISH \n- If Mixed -> Use MAJORITY language\n```\n\n### 1.2 Commit Style Classification\n\n| Style | Pattern | Example | Detection Regex |\n|-------|---------|---------|-----------------|\n| `SEMANTIC` | `type: message` or `type(scope): message` | `feat: add login` | `/^(feat\\|fix\\|chore\\|refactor\\|docs\\|test\\|ci\\|style\\|perf\\|build)(\\(.+\\))?:/` |\n| `PLAIN` | Just description, no prefix | `Add login feature` | No conventional prefix, >3 words |\n| `SENTENCE` | Full sentence style | `Implemented the new login flow` | Complete grammatical sentence |\n| `SHORT` | Minimal keywords | `format`, `lint` | 1-3 words only |\n\n**Detection Algorithm:**\n```\nsemantic_count = commits matching semantic regex\nplain_count = non-semantic commits with >3 words\nshort_count = commits with <=3 words\n\nIF semantic_count >= 15 (50%): STYLE = SEMANTIC\nELSE IF plain_count >= 15: STYLE = PLAIN \nELSE IF short_count >= 10: STYLE = SHORT\nELSE: STYLE = PLAIN (safe default)\n```\n\n### 1.3 MANDATORY OUTPUT (BLOCKING)\n\n**You MUST output this block before proceeding to Phase 2. NO EXCEPTIONS.**\n\n```\nSTYLE DETECTION RESULT\n======================\nAnalyzed: 30 commits from git log\n\nLanguage: [KOREAN | ENGLISH]\n - Korean commits: N (X%)\n - English commits: M (Y%)\n\nStyle: [SEMANTIC | PLAIN | SENTENCE | SHORT]\n - Semantic (feat:, fix:, etc): N (X%)\n - Plain: M (Y%)\n - Short: K (Z%)\n\nReference examples from repo:\n 1. \"actual commit message from log\"\n 2. \"actual commit message from log\"\n 3. \"actual commit message from log\"\n\nAll commits will follow: [LANGUAGE] + [STYLE]\n```\n\n**IF YOU SKIP THIS OUTPUT, YOUR COMMITS WILL BE WRONG. STOP AND REDO.**\n</style_detection>\n\n---\n\n## PHASE 2: Branch Context Analysis\n\n<branch_analysis>\n### 2.1 Determine Branch State\n\n```\nBRANCH_STATE:\n current_branch: <name>\n has_upstream: true | false\n commits_ahead: N # Local-only commits\n merge_base: <hash>\n \nREWRITE_SAFETY:\n - If has_upstream AND commits_ahead > 0 AND already pushed:\n -> WARN before force push\n - If no upstream OR all commits local:\n -> Safe for aggressive rewrite (fixup, reset, rebase)\n - If on main/master:\n -> NEVER rewrite, only new commits\n```\n\n### 2.2 History Rewrite Strategy Decision\n\n```\nIF current_branch == main OR current_branch == master:\n -> STRATEGY = NEW_COMMITS_ONLY\n -> Never fixup, never rebase\n\nELSE IF commits_ahead == 0:\n -> STRATEGY = NEW_COMMITS_ONLY\n -> No history to rewrite\n\nELSE IF all commits are local (not pushed):\n -> STRATEGY = AGGRESSIVE_REWRITE\n -> Fixup freely, reset if needed, rebase to clean\n\nELSE IF pushed but not merged:\n -> STRATEGY = CAREFUL_REWRITE \n -> Fixup OK but warn about force push\n```\n</branch_analysis>\n\n---\n\n## PHASE 3: Atomic Unit Planning (BLOCKING - MUST OUTPUT BEFORE PROCEEDING)\n\n<atomic_planning>\n**THIS PHASE HAS MANDATORY OUTPUT** - You MUST print the commit plan before moving to Phase 4.\n\n### 3.0 Calculate Minimum Commit Count FIRST\n\n```\nFORMULA: min_commits = ceil(file_count / 3)\n\n 3 files -> min 1 commit\n 5 files -> min 2 commits\n 9 files -> min 3 commits\n15 files -> min 5 commits\n```\n\n**If your planned commit count < min_commits -> WRONG. SPLIT MORE.**\n\n### 3.1 Split by Directory/Module FIRST (Primary Split)\n\n**RULE: Different directories = Different commits (almost always)**\n\n```\nExample: 8 changed files\n - app/[locale]/page.tsx\n - app/[locale]/layout.tsx\n - components/demo/browser-frame.tsx\n - components/demo/shopify-full-site.tsx\n - components/pricing/pricing-table.tsx\n - e2e/navbar.spec.ts\n - messages/en.json\n - messages/ko.json\n\nWRONG: 1 commit \"Update landing page\" (LAZY, WRONG)\nWRONG: 2 commits (still too few)\n\nCORRECT: Split by directory/concern:\n - Commit 1: app/[locale]/page.tsx + layout.tsx (app layer)\n - Commit 2: components/demo/* (demo components)\n - Commit 3: components/pricing/* (pricing components)\n - Commit 4: e2e/* (tests)\n - Commit 5: messages/* (i18n)\n = 5 commits from 8 files (CORRECT)\n```\n\n### 3.2 Split by Concern SECOND (Secondary Split)\n\n**Within same directory, split by logical concern:**\n\n```\nExample: components/demo/ has 4 files\n - browser-frame.tsx (UI frame)\n - shopify-full-site.tsx (specific demo)\n - review-dashboard.tsx (NEW - specific demo)\n - tone-settings.tsx (NEW - specific demo)\n\nOption A (acceptable): 1 commit if ALL tightly coupled\nOption B (preferred): 2 commits\n - Commit: \"Update existing demo components\" (browser-frame, shopify)\n - Commit: \"Add new demo components\" (review-dashboard, tone-settings)\n```\n\n### 3.3 NEVER Do This (Anti-Pattern Examples)\n\n```\nWRONG: \"Refactor entire landing page\" - 1 commit with 15 files\nWRONG: \"Update components and tests\" - 1 commit mixing concerns\nWRONG: \"Big update\" - Any commit touching 5+ unrelated files\n\nRIGHT: Multiple focused commits, each 1-4 files max\nRIGHT: Each commit message describes ONE specific change\nRIGHT: A reviewer can understand each commit in 30 seconds\n```\n\n### 3.4 Implementation + Test Pairing (MANDATORY)\n\n```\nRULE: Test files MUST be in same commit as implementation\n\nTest patterns to match:\n- test_*.py <-> *.py\n- *_test.py <-> *.py\n- *.test.ts <-> *.ts\n- *.spec.ts <-> *.ts\n- __tests__/*.ts <-> *.ts\n- tests/*.py <-> src/*.py\n```\n\n### 3.5 MANDATORY JUSTIFICATION (Before Creating Commit Plan)\n\n**NON-NEGOTIABLE: Before finalizing your commit plan, you MUST:**\n\n```\nFOR EACH planned commit with 3+ files:\n 1. List all files in this commit\n 2. Write ONE sentence explaining why they MUST be together\n 3. If you can't write that sentence -> SPLIT\n \nTEMPLATE:\n\"Commit N contains [files] because [specific reason they are inseparable].\"\n\nVALID reasons:\n VALID: \"implementation file + its direct test file\"\n VALID: \"type definition + the only file that uses it\"\n VALID: \"migration + model change (would break without both)\"\n \nINVALID reasons (MUST SPLIT instead):\n INVALID: \"all related to feature X\" (too vague)\n INVALID: \"part of the same PR\" (not a reason)\n INVALID: \"they were changed together\" (not a reason)\n INVALID: \"makes sense to group\" (not a reason)\n```\n\n**OUTPUT THIS JUSTIFICATION in your analysis before executing commits.**\n\n### 3.7 Dependency Ordering\n\n```\nLevel 0: Utilities, constants, type definitions\nLevel 1: Models, schemas, interfaces\nLevel 2: Services, business logic\nLevel 3: API endpoints, controllers\nLevel 4: Configuration, infrastructure\n\nCOMMIT ORDER: Level 0 -> Level 1 -> Level 2 -> Level 3 -> Level 4\n```\n\n### 3.8 Create Commit Groups\n\nFor each logical feature/change:\n```yaml\n- group_id: 1\n feature: \"Add Shopify discount deletion\"\n files:\n - errors/shopify_error.py\n - types/delete_input.py\n - mutations/update_contract.py\n - tests/test_update_contract.py\n dependency_level: 2\n target_commit: null | <existing-hash> # null = new, hash = fixup\n```\n\n### 3.9 MANDATORY OUTPUT (BLOCKING)\n\n**You MUST output this block before proceeding to Phase 4. NO EXCEPTIONS.**\n\n```\nCOMMIT PLAN\n===========\nFiles changed: N\nMinimum commits required: ceil(N/3) = M\nPlanned commits: K\nStatus: K >= M (PASS) | K < M (FAIL - must split more)\n\nCOMMIT 1: [message in detected style]\n - path/to/file1.py\n - path/to/file1_test.py\n Justification: implementation + its test\n\nCOMMIT 2: [message in detected style]\n - path/to/file2.py\n Justification: independent utility function\n\nCOMMIT 3: [message in detected style]\n - config/settings.py\n - config/constants.py\n Justification: tightly coupled config changes\n\nExecution order: Commit 1 -> Commit 2 -> Commit 3\n(follows dependency: Level 0 -> Level 1 -> Level 2 -> ...)\n```\n\n**VALIDATION BEFORE EXECUTION:**\n- Each commit has <=4 files (or justified)\n- Each commit message matches detected STYLE + LANGUAGE\n- Test files paired with implementation\n- Different directories = different commits (or justified)\n- Total commits >= min_commits\n\n**IF ANY CHECK FAILS, DO NOT PROCEED. REPLAN.**\n</atomic_planning>\n\n---\n\n## PHASE 4: Commit Strategy Decision\n\n<strategy_decision>\n### 4.1 For Each Commit Group, Decide:\n\n```\nFIXUP if:\n - Change complements existing commit's intent\n - Same feature, fixing bugs or adding missing parts\n - Review feedback incorporation\n - Target commit exists in local history\n\nNEW COMMIT if:\n - New feature or capability\n - Independent logical unit\n - Different issue/ticket\n - No suitable target commit exists\n```\n\n### 4.2 History Rebuild Decision (Aggressive Option)\n\n```\nCONSIDER RESET & REBUILD when:\n - History is messy (many small fixups already)\n - Commits are not atomic (mixed concerns)\n - Dependency order is wrong\n \nRESET WORKFLOW:\n 1. git reset --soft $(git merge-base HEAD main)\n 2. All changes now staged\n 3. Re-commit in proper atomic units\n 4. Clean history from scratch\n \nONLY IF:\n - All commits are local (not pushed)\n - User explicitly allows OR branch is clearly WIP\n```\n\n### 4.3 Final Plan Summary\n\n```yaml\nEXECUTION_PLAN:\n strategy: FIXUP_THEN_NEW | NEW_ONLY | RESET_REBUILD\n fixup_commits:\n - files: [...]\n target: <hash>\n new_commits:\n - files: [...]\n message: \"...\"\n level: N\n requires_force_push: true | false\n```\n</strategy_decision>\n\n---\n\n## PHASE 5: Commit Execution\n\n<execution>\n### 5.1 Register TODO Items\n\nUse TodoWrite to register each commit as a trackable item:\n```\n- [ ] Fixup: <description> -> <target-hash>\n- [ ] New: <description>\n- [ ] Rebase autosquash\n- [ ] Final verification\n```\n\n### 5.2 Fixup Commits (If Any)\n\n```bash\n# Stage files for each fixup\ngit add <files>\ngit commit --fixup=<target-hash>\n\n# Repeat for all fixups...\n\n# Single autosquash rebase at the end\nMERGE_BASE=$(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master)\nGIT_SEQUENCE_EDITOR=: git rebase -i --autosquash $MERGE_BASE\n```\n\n### 5.3 New Commits (After Fixups)\n\nFor each new commit group, in dependency order:\n\n```bash\n# Stage files\ngit add <file1> <file2> ...\n\n# Verify staging\ngit diff --staged --stat\n\n# Commit with detected style\ngit commit -m \"<message-matching-COMMIT_CONFIG>\"\n\n# Verify\ngit log -1 --oneline\n```\n\n### 5.4 Commit Message Generation\n\n**Based on COMMIT_CONFIG from Phase 1:**\n\n```\nIF style == SEMANTIC AND language == KOREAN:\n -> \"feat: \uB85C\uADF8\uC778 \uAE30\uB2A5 \uCD94\uAC00\"\n \nIF style == SEMANTIC AND language == ENGLISH:\n -> \"feat: add login feature\"\n \nIF style == PLAIN AND language == KOREAN:\n -> \"\uB85C\uADF8\uC778 \uAE30\uB2A5 \uCD94\uAC00\"\n \nIF style == PLAIN AND language == ENGLISH:\n -> \"Add login feature\"\n \nIF style == SHORT:\n -> \"format\" / \"type fix\" / \"lint\"\n```\n\n**VALIDATION before each commit:**\n1. Does message match detected style?\n2. Does language match detected language?\n3. Is it similar to examples from git log?\n\nIf ANY check fails -> REWRITE message.\n```\n</execution>\n\n---\n\n## PHASE 6: Verification & Cleanup\n\n<verification>\n### 6.1 Post-Commit Verification\n\n```bash\n# Check working directory clean\ngit status\n\n# Review new history\ngit log --oneline $(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master)..HEAD\n\n# Verify each commit is atomic\n# (mentally check: can each be reverted independently?)\n```\n\n### 6.2 Force Push Decision\n\n```\nIF fixup was used AND branch has upstream:\n -> Requires: git push --force-with-lease\n -> WARN user about force push implications\n \nIF only new commits:\n -> Regular: git push\n```\n\n### 6.3 Final Report\n\n```\nCOMMIT SUMMARY:\n Strategy: <what was done>\n Commits created: N\n Fixups merged: M\n \nHISTORY:\n <hash1> <message1>\n <hash2> <message2>\n ...\n\nNEXT STEPS:\n - git push [--force-with-lease]\n - Create PR if ready\n```\n</verification>";