aiwcli 0.15.5 → 0.15.7

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 (299) hide show
  1. package/README.md +6 -3
  2. package/dist/capabilities/branch/adapters.d.ts +2 -0
  3. package/dist/capabilities/branch/adapters.js +21 -0
  4. package/dist/capabilities/branch/contracts.d.ts +57 -0
  5. package/dist/capabilities/branch/contracts.js +1 -0
  6. package/dist/capabilities/branch/control-plane.d.ts +2 -0
  7. package/dist/capabilities/branch/control-plane.js +343 -0
  8. package/dist/capabilities/branch/runtime-core.d.ts +5 -0
  9. package/dist/capabilities/branch/runtime-core.js +36 -0
  10. package/dist/capabilities/installation/control-plane/clean-command.d.ts +41 -0
  11. package/dist/capabilities/installation/control-plane/clean-command.js +196 -0
  12. package/dist/capabilities/installation/control-plane/clear-command.d.ts +160 -0
  13. package/dist/capabilities/installation/control-plane/clear-command.js +1220 -0
  14. package/dist/capabilities/installation/control-plane/init-command.d.ts +81 -0
  15. package/dist/capabilities/installation/control-plane/init-command.js +449 -0
  16. package/dist/capabilities/launch/contracts.d.ts +51 -0
  17. package/dist/capabilities/launch/contracts.js +1 -0
  18. package/dist/capabilities/launch/control-plane/execute-launch.d.ts +2 -0
  19. package/dist/capabilities/launch/control-plane/execute-launch.js +222 -0
  20. package/dist/capabilities/launch/runtime-core/launch-options.d.ts +14 -0
  21. package/dist/capabilities/launch/runtime-core/launch-options.js +69 -0
  22. package/dist/cli/base-command.d.ts +18 -0
  23. package/dist/cli/base-command.js +55 -0
  24. package/dist/commands/branch.d.ts +0 -20
  25. package/dist/commands/branch.js +24 -416
  26. package/dist/commands/clean.d.ts +1 -41
  27. package/dist/commands/clean.js +1 -196
  28. package/dist/commands/clear.d.ts +1 -161
  29. package/dist/commands/clear.js +1 -1121
  30. package/dist/commands/init/index.d.ts +1 -98
  31. package/dist/commands/init/index.js +4 -478
  32. package/dist/commands/launch.d.ts +36 -11
  33. package/dist/commands/launch.js +135 -159
  34. package/dist/lib/base-command.d.ts +1 -114
  35. package/dist/lib/base-command.js +1 -153
  36. package/dist/lib/claude-settings-types.d.ts +31 -19
  37. package/dist/lib/context/context-formatter.d.ts +74 -0
  38. package/dist/lib/context/context-formatter.js +493 -0
  39. package/dist/lib/context/context-selector.d.ts +42 -0
  40. package/dist/lib/context/context-selector.js +451 -0
  41. package/dist/lib/context/context-store.d.ts +100 -0
  42. package/dist/lib/context/context-store.js +618 -0
  43. package/dist/lib/context/plan-manager.d.ts +54 -0
  44. package/dist/lib/context/plan-manager.js +282 -0
  45. package/dist/lib/context/task-tracker.d.ts +44 -0
  46. package/dist/lib/context/task-tracker.js +146 -0
  47. package/dist/lib/core-ide-base.d.ts +4 -0
  48. package/dist/lib/core-ide-base.js +77 -0
  49. package/dist/lib/core-installer.d.ts +5 -0
  50. package/dist/lib/core-installer.js +54 -0
  51. package/dist/lib/git-exclude-manager.d.ts +2 -2
  52. package/dist/lib/git-exclude-manager.js +3 -3
  53. package/dist/lib/hooks/hook-utils.d.ts +143 -0
  54. package/dist/lib/hooks/hook-utils.js +609 -0
  55. package/dist/lib/hooks/session-end-logic.d.ts +5 -0
  56. package/dist/lib/hooks/session-end-logic.js +63 -0
  57. package/dist/lib/hooks-merger.js +25 -19
  58. package/dist/lib/ide-path-resolver.d.ts +19 -7
  59. package/dist/lib/ide-path-resolver.js +25 -9
  60. package/dist/lib/install-state.d.ts +34 -0
  61. package/dist/lib/install-state.js +161 -0
  62. package/dist/lib/launch-options.d.ts +1 -0
  63. package/dist/lib/launch-options.js +1 -0
  64. package/dist/lib/lsp-patch.d.ts +12 -0
  65. package/dist/lib/lsp-patch.js +156 -0
  66. package/dist/lib/multiplexer.d.ts +57 -0
  67. package/dist/lib/multiplexer.js +19 -0
  68. package/dist/lib/multiplexers/psmux.d.ts +75 -0
  69. package/dist/lib/multiplexers/psmux.js +384 -0
  70. package/dist/lib/multiplexers/tmux.d.ts +44 -0
  71. package/dist/lib/multiplexers/tmux.js +262 -0
  72. package/dist/lib/mux-utils.d.ts +5 -0
  73. package/dist/lib/mux-utils.js +42 -0
  74. package/dist/lib/paths.d.ts +2 -2
  75. package/dist/lib/paths.js +2 -2
  76. package/dist/lib/platform-commands.d.ts +27 -0
  77. package/dist/lib/platform-commands.js +49 -0
  78. package/dist/lib/runtime/aiw-cli.d.ts +37 -0
  79. package/dist/lib/runtime/aiw-cli.js +74 -0
  80. package/dist/lib/runtime/atomic-write.d.ts +19 -0
  81. package/dist/lib/runtime/atomic-write.js +121 -0
  82. package/dist/lib/runtime/cli-args.d.ts +55 -0
  83. package/dist/lib/runtime/cli-args.js +185 -0
  84. package/dist/lib/runtime/constants.d.ts +56 -0
  85. package/dist/lib/runtime/constants.js +230 -0
  86. package/dist/lib/runtime/executable-policy.d.ts +16 -0
  87. package/dist/lib/runtime/executable-policy.js +57 -0
  88. package/dist/lib/runtime/git-state.d.ts +9 -0
  89. package/dist/lib/runtime/git-state.js +59 -0
  90. package/dist/lib/runtime/inference.d.ts +37 -0
  91. package/dist/lib/runtime/inference.js +262 -0
  92. package/dist/lib/runtime/lint-dispatch.d.ts +40 -0
  93. package/dist/lib/runtime/lint-dispatch.js +285 -0
  94. package/dist/lib/runtime/logger.d.ts +66 -0
  95. package/dist/lib/runtime/logger.js +201 -0
  96. package/dist/lib/runtime/models.d.ts +14 -0
  97. package/dist/lib/runtime/models.js +14 -0
  98. package/dist/lib/runtime/platform-adapter.d.ts +7 -0
  99. package/dist/lib/runtime/platform-adapter.js +21 -0
  100. package/dist/lib/runtime/preflight.d.ts +24 -0
  101. package/dist/lib/runtime/preflight.js +65 -0
  102. package/dist/lib/runtime/sentinel-ipc.d.ts +14 -0
  103. package/dist/lib/runtime/sentinel-ipc.js +67 -0
  104. package/dist/lib/runtime/state-io.d.ts +30 -0
  105. package/dist/lib/runtime/state-io.js +174 -0
  106. package/dist/lib/runtime/stop-words.d.ts +20 -0
  107. package/dist/lib/runtime/stop-words.js +150 -0
  108. package/dist/lib/runtime/subprocess-utils.d.ts +29 -0
  109. package/dist/lib/runtime/subprocess-utils.js +96 -0
  110. package/dist/lib/runtime/tmux-preflight.d.ts +13 -0
  111. package/dist/lib/runtime/tmux-preflight.js +78 -0
  112. package/dist/lib/runtime/utils.d.ts +54 -0
  113. package/dist/lib/runtime/utils.js +162 -0
  114. package/dist/lib/sentinel-wrapper.d.ts +9 -0
  115. package/dist/lib/sentinel-wrapper.js +20 -0
  116. package/dist/lib/shell-quoting.d.ts +5 -0
  117. package/dist/lib/shell-quoting.js +17 -0
  118. package/dist/lib/spawn-errors.d.ts +6 -0
  119. package/dist/lib/spawn-errors.js +15 -0
  120. package/dist/lib/spawn.js +5 -11
  121. package/dist/lib/template-installer.d.ts +4 -5
  122. package/dist/lib/template-installer.js +36 -34
  123. package/dist/lib/template-resolver.d.ts +6 -7
  124. package/dist/lib/template-resolver.js +26 -21
  125. package/dist/lib/template-settings-reconstructor.d.ts +7 -2
  126. package/dist/lib/template-settings-reconstructor.js +76 -45
  127. package/dist/lib/terminal-strategy.d.ts +11 -0
  128. package/dist/lib/terminal-strategy.js +49 -0
  129. package/dist/lib/terminal.d.ts +28 -0
  130. package/dist/lib/terminal.js +162 -112
  131. package/dist/lib/tmux-pane-placement.d.ts +17 -0
  132. package/dist/lib/tmux-pane-placement.js +58 -0
  133. package/dist/lib/tmux-primitives.d.ts +5 -0
  134. package/dist/lib/tmux-primitives.js +15 -0
  135. package/dist/lib/tmux-session.d.ts +32 -0
  136. package/dist/lib/tmux-session.js +86 -0
  137. package/dist/lib/tty-detection.js +1 -1
  138. package/dist/lib/types.d.ts +168 -0
  139. package/dist/lib/types.js +6 -0
  140. package/dist/lib/version.d.ts +1 -1
  141. package/dist/lib/version.js +1 -1
  142. package/dist/platform/launch.d.ts +10 -0
  143. package/dist/platform/launch.js +10 -0
  144. package/dist/templates/CLAUDE.md +31 -40
  145. package/dist/templates/cc-native/.claude/settings.json +27 -27
  146. package/dist/templates/cc-native/CC-NATIVE-README.md +1 -1
  147. package/dist/templates/cc-native/TEMPLATE-SCHEMA.md +10 -9
  148. package/dist/templates/cc-native/_cc-native/CLAUDE.md +18 -18
  149. package/dist/templates/cc-native/_cc-native/artifacts/CLAUDE.md +3 -3
  150. package/dist/templates/cc-native/_cc-native/artifacts/lib/format.ts +14 -14
  151. package/dist/templates/cc-native/_cc-native/artifacts/lib/tracker.ts +1 -1
  152. package/dist/templates/cc-native/_cc-native/artifacts/lib/write.ts +3 -3
  153. package/dist/templates/cc-native/_cc-native/cc-native.config.json +3 -3
  154. package/dist/templates/cc-native/_cc-native/hooks/CLAUDE.md +16 -15
  155. package/dist/templates/cc-native/_cc-native/hooks/cc-native-plan-review.ts +3 -3
  156. package/dist/templates/cc-native/_cc-native/hooks/enhance_plan_post_subagent.ts +2 -2
  157. package/dist/templates/cc-native/_cc-native/hooks/enhance_plan_post_write.ts +2 -2
  158. package/dist/templates/cc-native/_cc-native/hooks/mark_questions_asked.ts +3 -3
  159. package/dist/templates/cc-native/_cc-native/hooks/plan_questions_early.ts +2 -2
  160. package/dist/templates/cc-native/_cc-native/hooks/validate_task_prompt.ts +3 -3
  161. package/dist/templates/cc-native/_cc-native/lib-ts/CLAUDE.md +8 -8
  162. package/dist/templates/cc-native/_cc-native/lib-ts/aggregate-agents.ts +1 -1
  163. package/dist/templates/cc-native/_cc-native/lib-ts/cc-native-state.ts +4 -4
  164. package/dist/templates/cc-native/_cc-native/lib-ts/cli-output-parser.ts +1 -1
  165. package/dist/templates/cc-native/_cc-native/lib-ts/config.ts +1 -1
  166. package/dist/templates/cc-native/_cc-native/lib-ts/debug.ts +1 -1
  167. package/dist/templates/cc-native/_cc-native/lib-ts/json-parser.ts +1 -1
  168. package/dist/templates/cc-native/_cc-native/lib-ts/plan-discovery.ts +2 -2
  169. package/dist/templates/cc-native/_cc-native/lib-ts/rlm/logger.ts +1 -1
  170. package/dist/templates/cc-native/_cc-native/lib-ts/rlm/retrieval-pipeline.ts +2 -2
  171. package/dist/templates/cc-native/_cc-native/lib-ts/rlm/types.ts +1 -1
  172. package/dist/templates/cc-native/_cc-native/lib-ts/settings.ts +8 -8
  173. package/dist/templates/cc-native/_cc-native/lib-ts/state.ts +3 -3
  174. package/dist/templates/cc-native/_cc-native/lib-ts/tsconfig.json +2 -2
  175. package/dist/templates/cc-native/_cc-native/lib-ts/types.ts +3 -3
  176. package/dist/templates/cc-native/_cc-native/plan-review/CLAUDE.md +3 -1
  177. package/dist/templates/cc-native/_cc-native/plan-review/lib/__tests__/agent-selection.test.ts +345 -0
  178. package/dist/templates/cc-native/_cc-native/plan-review/lib/__tests__/preflight.test.ts +344 -0
  179. package/dist/templates/cc-native/_cc-native/plan-review/lib/agent-selection.ts +37 -15
  180. package/dist/templates/cc-native/_cc-native/plan-review/lib/corroboration.ts +16 -69
  181. package/dist/templates/cc-native/_cc-native/plan-review/lib/orchestrator.ts +1 -1
  182. package/dist/templates/cc-native/_cc-native/plan-review/lib/output-builder.ts +1 -1
  183. package/dist/templates/cc-native/_cc-native/plan-review/lib/plan-questions.ts +2 -2
  184. package/dist/templates/cc-native/_cc-native/plan-review/lib/preflight.ts +56 -26
  185. package/dist/templates/cc-native/_cc-native/plan-review/lib/review-pipeline.ts +7 -7
  186. package/dist/templates/cc-native/_cc-native/plan-review/lib/reviewers/agent.ts +4 -4
  187. package/dist/templates/cc-native/_cc-native/plan-review/lib/reviewers/base/base-agent.ts +3 -3
  188. package/dist/templates/cc-native/_cc-native/plan-review/lib/reviewers/index.ts +1 -1
  189. package/dist/templates/cc-native/_cc-native/plan-review/lib/reviewers/providers/claude-agent.ts +2 -2
  190. package/dist/templates/cc-native/_cc-native/plan-review/lib/reviewers/providers/codex-agent.ts +4 -4
  191. package/dist/templates/cc-native/_cc-native/plan-review/lib/reviewers/providers/gemini-agent.ts +1 -1
  192. package/dist/templates/cc-native/_cc-native/plan-review/lib/reviewers/providers/orchestrator-claude-agent.ts +5 -6
  193. package/dist/templates/core/.codex/workflows/codex.md +17 -0
  194. package/dist/templates/core/.codex/workflows/handoff.md +5 -0
  195. package/dist/templates/core/.codex/workflows/meta-plan.md +7 -0
  196. package/dist/templates/core/.cognition/AGENTS.md +5 -0
  197. package/dist/templates/core/.cognition/config.json +12 -0
  198. package/dist/templates/{_shared → core}/.windsurf/workflows/handoff.md +1 -1
  199. package/dist/templates/{_shared → core}/.windsurf/workflows/meta-plan.md +1 -1
  200. package/dist/templates/core/hooks-ts/_utils/git-state.ts +2 -0
  201. package/dist/templates/{_shared → core}/hooks-ts/archive_plan.ts +14 -23
  202. package/dist/templates/core/hooks-ts/codex_explorer.ts +160 -0
  203. package/dist/templates/{_shared → core}/hooks-ts/context_monitor.ts +23 -55
  204. package/dist/templates/{_shared → core}/hooks-ts/file-suggestion.ts +4 -3
  205. package/dist/templates/{_shared → core}/hooks-ts/lint_after_edit.ts +7 -9
  206. package/dist/templates/{_shared → core}/hooks-ts/pre_compact.ts +5 -5
  207. package/dist/templates/{_shared → core}/hooks-ts/session_end.ts +38 -78
  208. package/dist/templates/{_shared → core}/hooks-ts/session_start.ts +5 -5
  209. package/dist/templates/core/hooks-ts/task_create_capture.ts +32 -0
  210. package/dist/templates/{_shared → core}/hooks-ts/task_update_capture.ts +9 -24
  211. package/dist/templates/core/hooks-ts/user_prompt_submit.ts +46 -0
  212. package/dist/templates/{_shared → core}/lib-ts/CLAUDE.md +27 -16
  213. package/dist/templates/{_shared → core}/lib-ts/agent-exec/backends/headless.ts +3 -2
  214. package/dist/templates/{_shared → core}/lib-ts/agent-exec/backends/tmux.ts +44 -15
  215. package/dist/templates/{_shared → core}/lib-ts/agent-exec/base-agent.ts +6 -4
  216. package/dist/templates/{_shared → core}/lib-ts/agent-exec/execution-backend.ts +1 -1
  217. package/dist/templates/{_shared → core}/lib-ts/agent-exec/index.ts +2 -2
  218. package/dist/templates/{_shared → core}/lib-ts/agent-exec/structured-output.ts +4 -5
  219. package/dist/templates/{_shared → core}/lib-ts/context/CLAUDE.md +9 -6
  220. package/dist/templates/{_shared → core}/lib-ts/context/context-formatter.ts +16 -21
  221. package/dist/templates/{_shared → core}/lib-ts/context/context-selector.ts +8 -6
  222. package/dist/templates/{_shared → core}/lib-ts/context/context-store.ts +32 -20
  223. package/dist/templates/{_shared → core}/lib-ts/context/plan-manager.ts +19 -15
  224. package/dist/templates/{_shared → core}/lib-ts/context/task-tracker.ts +3 -3
  225. package/dist/templates/core/lib-ts/hooks/context-monitor-logic.ts +32 -0
  226. package/dist/templates/{_shared/lib-ts/base → core/lib-ts/hooks}/hook-utils.ts +168 -41
  227. package/dist/templates/core/lib-ts/hooks/prompt-binding-logic.ts +80 -0
  228. package/dist/templates/core/lib-ts/hooks/session-end-logic.ts +93 -0
  229. package/dist/templates/core/lib-ts/package.json +19 -0
  230. package/dist/templates/core/lib-ts/runtime/agent-launcher.ts +295 -0
  231. package/dist/templates/core/lib-ts/runtime/aiw-cli.ts +106 -0
  232. package/dist/templates/{_shared/lib-ts/base → core/lib-ts/runtime}/atomic-write.ts +12 -7
  233. package/dist/templates/{_shared/lib-ts/base → core/lib-ts/runtime}/cli-args.ts +8 -6
  234. package/dist/templates/{_shared/lib-ts/base → core/lib-ts/runtime}/constants.ts +326 -324
  235. package/dist/templates/core/lib-ts/runtime/executable-policy.ts +89 -0
  236. package/dist/templates/{_shared/lib-ts/base → core/lib-ts/runtime}/git-state.ts +6 -4
  237. package/dist/templates/{_shared/lib-ts/base → core/lib-ts/runtime}/inference.ts +59 -10
  238. package/dist/templates/{_shared/lib-ts/base → core/lib-ts/runtime}/lint-dispatch.ts +25 -23
  239. package/dist/templates/{_shared/lib-ts/base → core/lib-ts/runtime}/logger.ts +32 -29
  240. package/dist/templates/{_shared/lib-ts/base → core/lib-ts/runtime}/models.ts +2 -2
  241. package/dist/templates/core/lib-ts/runtime/platform-adapter.ts +33 -0
  242. package/dist/templates/{_shared/lib-ts/base → core/lib-ts/runtime}/preflight.ts +4 -3
  243. package/dist/templates/core/lib-ts/runtime/sentinel-ipc.ts +91 -0
  244. package/dist/templates/{_shared/lib-ts/base → core/lib-ts/runtime}/state-io.ts +11 -7
  245. package/dist/templates/core/lib-ts/runtime/stop-words.ts +185 -0
  246. package/dist/templates/core/lib-ts/runtime/subprocess-utils.ts +147 -0
  247. package/dist/templates/core/lib-ts/runtime/tmux-preflight.ts +93 -0
  248. package/dist/templates/{_shared/lib-ts/base → core/lib-ts/runtime}/utils.ts +4 -3
  249. package/dist/templates/{_shared → core}/lib-ts/templates/formatters.ts +7 -5
  250. package/dist/templates/{_shared → core}/lib-ts/templates/plan-context.ts +2 -1
  251. package/dist/templates/{_shared → core}/lib-ts/tsconfig.json +3 -1
  252. package/dist/templates/{_shared → core}/lib-ts/types.ts +78 -77
  253. package/dist/templates/core/scripts/resolve-run.ts +61 -0
  254. package/dist/templates/{_shared → core}/scripts/resolve_context.ts +3 -3
  255. package/dist/templates/{_shared → core}/scripts/status_line.ts +25 -20
  256. package/dist/templates/core/skills/codex/CLAUDE.md +78 -0
  257. package/dist/templates/{_shared → core}/skills/codex/SKILL.md +21 -18
  258. package/dist/templates/{_shared → core}/skills/codex/lib/codex-watcher.ts +76 -103
  259. package/dist/templates/{_shared → core}/skills/codex/scripts/launch-codex.ts +119 -133
  260. package/dist/templates/{_shared → core}/skills/codex/scripts/watch-codex.ts +6 -4
  261. package/dist/templates/core/skills/devin/CLAUDE.md +65 -0
  262. package/dist/templates/core/skills/devin/SKILL.md +73 -0
  263. package/dist/templates/core/skills/devin/lib/devin-watcher.ts +280 -0
  264. package/dist/templates/core/skills/devin/scripts/launch-devin.ts +257 -0
  265. package/dist/templates/{_shared → core}/skills/handoff-system/CLAUDE.md +436 -433
  266. package/dist/templates/{_shared → core}/skills/handoff-system/lib/document-generator.ts +9 -7
  267. package/dist/templates/{_shared → core}/skills/handoff-system/lib/handoff-reader.ts +6 -4
  268. package/dist/templates/{_shared → core}/skills/handoff-system/scripts/resume_handoff.ts +10 -8
  269. package/dist/templates/{_shared → core}/skills/handoff-system/scripts/save_handoff.ts +12 -10
  270. package/dist/templates/{_shared → core}/skills/handoff-system/workflows/handoff-resume.md +2 -2
  271. package/dist/templates/{_shared → core}/skills/handoff-system/workflows/handoff.md +6 -5
  272. package/dist/templates/{_shared → core}/skills/meta-plan/CLAUDE.md +2 -1
  273. package/dist/templates/{_shared → core}/skills/meta-plan/workflows/meta-plan.md +8 -7
  274. package/oclif.manifest.json +89 -13
  275. package/package.json +13 -12
  276. package/dist/templates/_shared/.claude/settings.json +0 -120
  277. package/dist/templates/_shared/.claude/skills/codex/SKILL.md +0 -35
  278. package/dist/templates/_shared/.claude/skills/handoff/SKILL.md +0 -13
  279. package/dist/templates/_shared/.claude/skills/handoff-resume/SKILL.md +0 -13
  280. package/dist/templates/_shared/.claude/skills/meta-plan/SKILL.md +0 -43
  281. package/dist/templates/_shared/.codex/workflows/codex.md +0 -11
  282. package/dist/templates/_shared/.codex/workflows/handoff.md +0 -226
  283. package/dist/templates/_shared/.codex/workflows/meta-plan.md +0 -347
  284. package/dist/templates/_shared/hooks-ts/_utils/git-state.ts +0 -2
  285. package/dist/templates/_shared/hooks-ts/task_create_capture.ts +0 -48
  286. package/dist/templates/_shared/hooks-ts/user_prompt_submit.ts +0 -93
  287. package/dist/templates/_shared/lib-ts/base/launchers/tmux-launcher.ts +0 -173
  288. package/dist/templates/_shared/lib-ts/base/launchers/window-launcher.ts +0 -93
  289. package/dist/templates/_shared/lib-ts/base/launchers/wt-launcher.ts +0 -64
  290. package/dist/templates/_shared/lib-ts/base/pane-launcher.ts +0 -55
  291. package/dist/templates/_shared/lib-ts/base/sentinel-ipc.ts +0 -87
  292. package/dist/templates/_shared/lib-ts/base/stop-words.ts +0 -184
  293. package/dist/templates/_shared/lib-ts/base/subprocess-utils.ts +0 -249
  294. package/dist/templates/_shared/lib-ts/base/tmux-driver.ts +0 -341
  295. package/dist/templates/_shared/lib-ts/base/tmux-pane-placement.ts +0 -78
  296. package/dist/templates/_shared/lib-ts/package.json +0 -20
  297. package/dist/templates/_shared/scripts/resolve-run.ts +0 -62
  298. package/dist/templates/_shared/skills/codex/CLAUDE.md +0 -70
  299. /package/dist/templates/{_shared → core}/lib-ts/agent-exec/backends/index.ts +0 -0
@@ -8,14 +8,14 @@
8
8
 
9
9
  import * as crypto from "node:crypto";
10
10
  import * as fs from "node:fs";
11
- import * as path from "node:path";
11
+ import path from "node:path";
12
12
 
13
- import { atomicWrite } from "../../../lib-ts/base/atomic-write.js";
14
- import { getContextHandoffsDir, getContextDir } from "../../../lib-ts/base/constants.js";
15
- import { logInfo, logError } from "../../../lib-ts/base/logger.js";
16
- import { nowIso } from "../../../lib-ts/base/utils.js";
17
13
  import { getContext } from "../../../lib-ts/context/context-store.js";
18
14
  import { getTasks } from "../../../lib-ts/context/task-tracker.js";
15
+ import { atomicWrite } from "../../../lib-ts/runtime/atomic-write.js";
16
+ import { getContextHandoffsDir, getContextDir } from "../../../lib-ts/runtime/constants.js";
17
+ import { logInfo, logError } from "../../../lib-ts/runtime/logger.js";
18
+ import { nowIso } from "../../../lib-ts/runtime/utils.js";
19
19
  import { renderTaskList, formatContinuationHeader, formatReason } from "../../../lib-ts/templates/formatters.js";
20
20
  import type { HandoffDocument } from "../../../lib-ts/types.js";
21
21
 
@@ -131,7 +131,7 @@ function renderHandoffMarkdown(doc: HandoffDocument): string {
131
131
  // Completed this session
132
132
  if (doc.completed_tasks_this_session.length > 0) {
133
133
  lines.push(renderTaskList(
134
- doc.completed_tasks_this_session as any[],
134
+ doc.completed_tasks_this_session as unknown[],
135
135
  "Completed This Session",
136
136
  false,
137
137
  ).trimEnd());
@@ -199,7 +199,7 @@ Your context window is running low. Please:
199
199
  1. **Finish current task** if 1-2 steps away, OR save current progress
200
200
  2. **Create handoff document** by calling:
201
201
  \`\`\`python
202
- from _shared.lib.handoff import generate_handoff_document
202
+ from core.lib.handoff import generate_handoff_document
203
203
  doc = generate_handoff_document(
204
204
  context_id="${contextId}",
205
205
  reason="low_context",
@@ -214,3 +214,5 @@ After creating handoff, ask the user:
214
214
  "Context is low. I've created a handoff document. May I clear and continue in a new session?"
215
215
  </system-reminder>`;
216
216
  }
217
+
218
+
@@ -7,10 +7,10 @@
7
7
  */
8
8
 
9
9
  import * as fs from "node:fs";
10
- import * as path from "node:path";
10
+ import path from "node:path";
11
11
 
12
- import { getContextHandoffsDir } from "../../../lib-ts/base/constants.js";
13
12
  import { getContext } from "../../../lib-ts/context/context-store.js";
13
+ import { getContextHandoffsDir } from "../../../lib-ts/runtime/constants.js";
14
14
  import type { HandoffSections } from "../../../lib-ts/types.js";
15
15
 
16
16
  /**
@@ -65,7 +65,7 @@ export function readHandoffSections(handoffFolder: string): HandoffSections {
65
65
  const filePath = path.join(handoffFolder, filename);
66
66
  try {
67
67
  if (fs.existsSync(filePath)) {
68
- sections[key as keyof HandoffSections] = fs.readFileSync(filePath, "utf-8");
68
+ sections[key as keyof HandoffSections] = fs.readFileSync(filePath, "utf8");
69
69
  }
70
70
  } catch {
71
71
  // graceful — leave as null
@@ -111,7 +111,7 @@ export function getHandoffPlanReference(
111
111
  const planMdPath = path.join(handoffFolder, "plan.md");
112
112
  try {
113
113
  if (fs.existsSync(planMdPath)) {
114
- const content = fs.readFileSync(planMdPath, "utf-8");
114
+ const content = fs.readFileSync(planMdPath, "utf8");
115
115
  const frontmatter = parseFrontmatter(content);
116
116
  if (frontmatter["plan_path"]) {
117
117
  const pp = frontmatter["plan_path"];
@@ -157,3 +157,5 @@ function parseFrontmatter(content: string): Record<string, string> {
157
157
 
158
158
  return frontmatter;
159
159
  }
160
+
161
+
@@ -4,8 +4,8 @@
4
4
  * a structured briefing to stdout.
5
5
  *
6
6
  * Usage:
7
- * bun .aiwcli/_shared/skills/handoff-system/scripts/resume_handoff.ts <handoff_folder_or_index>
8
- * bun .aiwcli/_shared/skills/handoff-system/scripts/resume_handoff.ts --context <context_id>
7
+ * bun .aiwcli/_core/skills/handoff-system/scripts/resume_handoff.ts <handoff_folder_or_index>
8
+ * bun .aiwcli/_core/skills/handoff-system/scripts/resume_handoff.ts --context <context_id>
9
9
  *
10
10
  * If no args, auto-discovers the active context and finds the latest handoff.
11
11
  *
@@ -13,12 +13,12 @@
13
13
  * ready to be consumed by the /handoff-resume command template.
14
14
  */
15
15
  import * as fs from "node:fs";
16
- import * as path from "node:path";
16
+ import path from "node:path";
17
17
 
18
- import { getProjectRoot } from "../../../lib-ts/base/constants.js";
19
- import { getGitStatusShort } from "../../../lib-ts/base/git-state.js";
20
- import { eprint } from "../../../lib-ts/base/utils.js";
21
18
  import { getContextBySessionId } from "../../../lib-ts/context/context-store.js";
19
+ import { getProjectRoot } from "../../../lib-ts/runtime/constants.js";
20
+ import { getGitStatusShort } from "../../../lib-ts/runtime/git-state.js";
21
+ import { eprint } from "../../../lib-ts/runtime/utils.js";
22
22
  import {
23
23
  findLatestHandoff,
24
24
  readHandoffSections,
@@ -181,7 +181,7 @@ function main(): void {
181
181
  const planRef = getHandoffPlanReference(handoffFolder, resolvedContextId, projectRoot);
182
182
  if (planRef) {
183
183
  try {
184
- const planContent = fs.readFileSync(planRef, "utf-8");
184
+ const planContent = fs.readFileSync(planRef, "utf8");
185
185
  const progress = countPlanProgress(planContent);
186
186
  if (progress) {
187
187
  const [done, total] = progress;
@@ -326,7 +326,7 @@ function main(): void {
326
326
  const planRef = getHandoffPlanReference(handoffFolder, resolvedContextId, projectRoot);
327
327
  if (planRef) {
328
328
  try {
329
- fullPlanContent = fs.readFileSync(planRef, "utf-8");
329
+ fullPlanContent = fs.readFileSync(planRef, "utf8");
330
330
  } catch {
331
331
  // ignore — no plan to append
332
332
  }
@@ -371,3 +371,5 @@ function extractContextIdFromIndex(indexContent: string | null): string | null {
371
371
  }
372
372
 
373
373
  main();
374
+
375
+
@@ -3,12 +3,12 @@
3
3
  * Save a handoff document with folder-based sharding.
4
4
  *
5
5
  * Usage:
6
- * bun .aiwcli/_shared/skills/handoff-system/scripts/save_handoff.ts <<'EOF'
6
+ * bun .aiwcli/_core/skills/handoff-system/scripts/save_handoff.ts <<'EOF'
7
7
  * # Your handoff markdown content here (with <!-- SECTION: name --> markers)
8
8
  * EOF
9
9
  *
10
10
  * Or with a file:
11
- * bun .aiwcli/_shared/skills/handoff-system/scripts/save_handoff.ts < handoff.md
11
+ * bun .aiwcli/_core/skills/handoff-system/scripts/save_handoff.ts < handoff.md
12
12
  *
13
13
  * This script:
14
14
  * 1. Auto-resolves the active context ID
@@ -21,14 +21,14 @@
21
21
  * 5. Sets handoff_path and handoff_consumed=false in state.json
22
22
  */
23
23
  import * as fs from "node:fs";
24
- import * as path from "node:path";
24
+ import path from "node:path";
25
25
 
26
- import { atomicWrite } from "../../../lib-ts/base/atomic-write.js";
27
- import { getHandoffFolderPath, getProjectRoot } from "../../../lib-ts/base/constants.js";
28
- import { getGitStatusShort } from "../../../lib-ts/base/git-state.js";
29
- import { logInfo, logWarn, logError } from "../../../lib-ts/base/logger.js";
30
- import { eprint } from "../../../lib-ts/base/utils.js";
31
26
  import { getContext, saveState, getContextBySessionId, getAllContexts } from "../../../lib-ts/context/context-store.js";
27
+ import { atomicWrite } from "../../../lib-ts/runtime/atomic-write.js";
28
+ import { getHandoffFolderPath, getProjectRoot } from "../../../lib-ts/runtime/constants.js";
29
+ import { getGitStatusShort } from "../../../lib-ts/runtime/git-state.js";
30
+ import { logInfo, logWarn, logError } from "../../../lib-ts/runtime/logger.js";
31
+ import { eprint } from "../../../lib-ts/runtime/utils.js";
32
32
 
33
33
  // ---------------------------------------------------------------------------
34
34
  // Parsing helpers
@@ -192,7 +192,7 @@ function main(): void {
192
192
  // Read content from stdin FIRST (needed to extract session_id from frontmatter)
193
193
  let content: string;
194
194
  try {
195
- content = fs.readFileSync(0, "utf-8");
195
+ content = fs.readFileSync(0, "utf8");
196
196
  } catch {
197
197
  logError("save_handoff", "Failed to read from stdin");
198
198
  process.exit(1);
@@ -339,7 +339,7 @@ function main(): void {
339
339
  } else if (planPath) {
340
340
  // Fallback: copy unchanged plan if Claude didn't provide an update
341
341
  try {
342
- const planContent = fs.readFileSync(planPath, "utf-8");
342
+ const planContent = fs.readFileSync(planPath, "utf8");
343
343
  const [success, error] = atomicWrite(path.join(handoffFolder, "plan.md"), planContent);
344
344
  if (success) {
345
345
  logInfo("save_handoff", `Copied unchanged plan from ${planPath}`);
@@ -466,3 +466,5 @@ function main(): void {
466
466
  }
467
467
 
468
468
  main();
469
+
470
+
@@ -16,13 +16,13 @@ Run the resume script to collect and format all handoff sections:
16
16
 
17
17
  **If `$ARGUMENTS` is provided:**
18
18
  ```bash
19
- bun .aiwcli/_shared/skills/handoff-system/scripts/resume_handoff.ts "$ARGUMENTS"
19
+ bun .aiwcli/_core/skills/handoff-system/scripts/resume_handoff.ts "$ARGUMENTS"
20
20
  ```
21
21
 
22
22
  **If `$ARGUMENTS` is empty:**
23
23
  The script auto-discovers the active context ID programmatically — no manual lookup needed:
24
24
  ```bash
25
- bun .aiwcli/_shared/skills/handoff-system/scripts/resume_handoff.ts
25
+ bun .aiwcli/_core/skills/handoff-system/scripts/resume_handoff.ts
26
26
  ```
27
27
 
28
28
  Present the script's output to the conversation. The output is already structured in priority order (dead ends first, then pending items, decisions, git delta, completed work, context notes).
@@ -153,7 +153,7 @@ The closing `EOF` delimiter **MUST** be at column 0 (no leading spaces or tabs).
153
153
 
154
154
  **Correct Example:**
155
155
  ```bash
156
- bun .aiwcli/_shared/skills/handoff-system/scripts/save_handoff.ts <<'EOF'
156
+ bun .aiwcli/_core/skills/handoff-system/scripts/save_handoff.ts <<'EOF'
157
157
  content here
158
158
  EOF
159
159
  ```
@@ -161,7 +161,7 @@ EOF
161
161
 
162
162
  **Wrong Example (will fail):**
163
163
  ```bash
164
- bun .aiwcli/_shared/skills/handoff-system/scripts/save_handoff.ts <<'EOF'
164
+ bun .aiwcli/_core/skills/handoff-system/scripts/save_handoff.ts <<'EOF'
165
165
  content here
166
166
  EOF
167
167
  ```
@@ -172,7 +172,7 @@ content here
172
172
  Instead of writing the file directly, pipe your handoff content to the save script:
173
173
 
174
174
  ```bash
175
- bun .aiwcli/_shared/skills/handoff-system/scripts/save_handoff.ts <<'EOF'
175
+ bun .aiwcli/_core/skills/handoff-system/scripts/save_handoff.ts <<'EOF'
176
176
  {Your complete handoff markdown content from Step 3}
177
177
  EOF
178
178
  ```
@@ -181,7 +181,7 @@ This script:
181
181
  1. Auto-resolves the active context ID
182
182
  2. Creates a folder at `_output/contexts/{context_id}/handoffs/{YYYY-MM-DD-HHMM}/`
183
183
  3. Parses sections and writes sharded files (index.md, completed-work.md, dead-ends.md, etc.)
184
- 4. Copies the current plan (if any) to plan.md
184
+ 4. Copies the current plan (if unknown) to plan.md
185
185
  5. Sets `handoff_path` and `handoff_consumed=false` in state.json
186
186
 
187
187
  **After handoff is saved, the context becomes dormant:**
@@ -223,7 +223,7 @@ After creating file, output:
223
223
  ✓ Created handoff folder: _output/contexts/{context_id}/handoffs/{YYYY-MM-DD-HHMM}/
224
224
  - index.md (entry point with navigation)
225
225
  - completed-work.md, dead-ends.md, decisions.md, pending.md, context.md
226
- - plan.md (copy of current plan, if any)
226
+ - plan.md (copy of current plan, if unknown)
227
227
 
228
228
  To continue next session:
229
229
  The index.md will be automatically suggested when you start a new session.
@@ -252,3 +252,4 @@ If plan was updated:
252
252
  - [ ] If plan provided: checkboxes updated to reflect completion status
253
253
  - [ ] If plan provided: Session Progress Log appended
254
254
  - [ ] Context state updated to indicate handoff pending
255
+
@@ -27,7 +27,7 @@ meta-plan/
27
27
 
28
28
  ## Design Decisions
29
29
 
30
- **Reasoning lenses, not action steps:** Each of the 7 analysis categories is a lens for examining the problem from a specific angle. They contain concrete instructions for deepening understanding, not for producing implementation steps. This makes MetaPlan fully functional without any external skill system. Skills are system-agnostic — they work in any AI environment.
30
+ **Reasoning lenses, not action steps:** Each of the 7 analysis categories is a lens for examining the problem from a specific angle. They contain concrete instructions for deepening understanding, not for producing implementation steps. This makes MetaPlan fully functional without requiring any external skill system. Skills are system-agnostic — they work in any AI environment.
31
31
 
32
32
  **Prompt amplification model:** MetaPlan's output is an "Amplified Request" — the original prompt enriched with decomposition, approach analysis, trade-offs, risks, and a recommended direction. This becomes the input for a planning session, not the plan itself.
33
33
 
@@ -44,3 +44,4 @@ MetaPlan output (the Amplified Request) is captured automatically by plan mode (
44
44
  ## Hooks
45
45
 
46
46
  None. MetaPlan is a pure workflow document — no hooks required.
47
+
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Reference Material
6
6
 
7
- - `.aiwcli/_shared/skills/meta-plan/CLAUDE.md` — MetaPlan system spec: purpose, design decisions, constraints
7
+ - `.aiwcli/_core/skills/meta-plan/CLAUDE.md` — MetaPlan system spec: purpose, design decisions, constraints
8
8
 
9
9
  ---
10
10
 
@@ -52,7 +52,7 @@ Decompose the user's prompt into 5 categories. **Preserve all information** from
52
52
 
53
53
  ### Information Loss Check
54
54
 
55
- After completing the decomposition, **re-read the original prompt in full** and explicitly list any information not captured in the 5 categories above. This prevents silent information loss.
55
+ After completing the decomposition, **re-read the original prompt in full** and explicitly list unknown information not captured in the 5 categories above. This prevents silent information loss.
56
56
 
57
57
  Output one of:
58
58
  - A numbered list of missed information items (then incorporate them into the appropriate category)
@@ -77,9 +77,9 @@ Based on the characteristics from Section 1, select which analysis categories to
77
77
 
78
78
  | Problem Profile | Categories to Apply | Rationale |
79
79
  |----------------|-------------------|-----------|
80
- | High ambiguity, any domain | 1 → 2 → 3 → 7 (Decomposition → Divergent → Convergent → Integration) | Explore broadly before narrowing |
80
+ | High ambiguity, unknown domain | 1 → 2 → 3 → 7 (Decomposition → Divergent → Convergent → Integration) | Explore broadly before narrowing |
81
81
  | Large solution space, familiar domain | 1 → 2 → 4 → 5 → 7 (Decomposition → Divergent → Adversarial → Trade-off → Integration) | Stress-test candidates |
82
- | Unfamiliar domain, any ambiguity | 1 → 6 → 2 → 3 → 7 (Decomposition → Expert Synthesis → Divergent → Convergent → Integration) | Research before ideation |
82
+ | Unfamiliar domain, unknown ambiguity | 1 → 6 → 2 → 3 → 7 (Decomposition → Expert Synthesis → Divergent → Convergent → Integration) | Research before ideation |
83
83
  | Multi-stakeholder, moderate ambiguity | 1 → 6 → 5 → 4 → 7 (Decomposition → Expert Synthesis → Trade-off → Adversarial → Integration) | Gather perspectives, evaluate trade-offs |
84
84
  | Low ambiguity, small solution space | 1 → 4 → 7 (Decomposition → Adversarial → Integration) | Quick path: decompose, stress-test, synthesize |
85
85
  | Multiple valid approaches, familiar domain | 1 → 2 → 5 → 4 → 7 (Decomposition → Divergent → Trade-off → Adversarial → Integration) | Compare, evaluate, stress-test |
@@ -92,7 +92,7 @@ Numbers reference the 7 categories in Section 3.
92
92
 
93
93
  ## Section 3 — The 7 Analysis Categories
94
94
 
95
- Each category is a **reasoning lens** — a structured way to examine the problem from a specific angle. Apply each selected category to deepen understanding of the user's request. External skills discovered at runtime (see Section 4) can enhance any category but are never required.
95
+ Each category is a **reasoning lens** — a structured way to examine the problem from a specific angle. Apply each selected category to deepen understanding of the user's request. External skills discovered at runtime (see Section 4) can enhance unknown category but are never required.
96
96
 
97
97
  ### Category 1: Decomposition
98
98
 
@@ -129,7 +129,7 @@ Narrow from many candidates to 1-3 finalists using structured evaluation.
129
129
  **Apply this lens:**
130
130
  - Define 3-5 evaluation criteria relevant to this problem (e.g., complexity, performance, maintainability, risk, time-to-implement)
131
131
  - Score each approach against each criterion (High / Medium / Low)
132
- - Identify deal-breakers: any approach that fails a critical criterion is eliminated with stated reason
132
+ - Identify deal-breakers: unknown approach that fails a critical criterion is eliminated with stated reason
133
133
  - Rank surviving approaches
134
134
 
135
135
  **Output:** Evaluation matrix — scores, eliminations with reasoning, and shortlist of 1-3 surviving approaches.
@@ -159,7 +159,7 @@ Compare surviving approaches with explicit acknowledgment of what each choice co
159
159
  - For each pair of finalist approaches, state what you gain and what you lose by choosing one over the other
160
160
  - Identify irreversible decisions (hard to change later) vs. reversible ones (can switch cheaply)
161
161
  - State the conditions under which you would switch from the recommended approach to an alternative
162
- - Flag any "one-way door" decisions that deserve extra scrutiny
162
+ - Flag unknown "one-way door" decisions that deserve extra scrutiny
163
163
 
164
164
  **Output:** Trade-off map — gain/lose analysis with switching conditions and irreversibility flags.
165
165
 
@@ -275,3 +275,4 @@ After the amplified request, append an inventory of which categories were applie
275
275
  | 6: Expert Synthesis | Yes/No | [What this lens revealed] |
276
276
  | 7: Integration | Yes | [Synthesized into amplified request above] |
277
277
  ```
278
+
@@ -189,7 +189,7 @@
189
189
  "clear": {
190
190
  "aliases": [],
191
191
  "args": {},
192
- "description": "Clear workflow folders, output folders, IDE method folders (.claude/.windsurf), and update configurations",
192
+ "description": "Clear method runtime folders, output folders, IDE method folders (.claude/.codex/.windsurf), and update configurations",
193
193
  "examples": [
194
194
  "<%= config.bin %> <%= command.id %>",
195
195
  "<%= config.bin %> <%= command.id %> --template cc-native",
@@ -275,19 +275,18 @@
275
275
  "launch": {
276
276
  "aliases": [],
277
277
  "args": {},
278
- "description": "Launch Claude Code or Codex with AIW configuration (sandbox disabled, tmux-first by default)\n\nFLAGS\n --codex/-c: Launch Codex instead of Claude Code (uses --yolo flag)\n --new/-n: Open a new terminal in the current directory and launch there\n --no-tmux/-t: Launch directly in current shell instead of auto-launching tmux\n --tmux-session/-s: tmux session name to reuse when auto-launching tmux (default is fresh session per launch)\n\nEXIT CODES\n 0 Success - AI assistant launched and exited successfully\n 1 General error - unexpected runtime failure\n 2 Invalid usage - check your arguments and flags\n 3 Environment error - CLI not found (install Claude Code from https://claude.ai/download, Codex from npm)",
278
+ "description": "Launch Claude Code, Codex, or Devin with AIW configuration (sandbox disabled, tmux-first; Windows opens mintty window first with inline fallback)\n\nFLAGS\n --codex/-c: Launch Codex instead of Claude Code (uses --yolo flag)\n --devin/-e: Launch Devin CLI instead of Claude Code (uses --permission-mode dangerous)\n --new/-n: Open a new terminal in the current directory and launch there\n --no-tmux/-t: Launch directly in current shell instead of auto-launching tmux\n --tmux-session/-s: tmux session name to reuse when auto-launching tmux\n --prompt/-p: Initial prompt to pass to the AI REPL at startup\n --wait: Block until launched pane exits (for scripted callers)\n --json: JSON output (paneId, backend, exitCode, sentinel)\n --split: Split direction when in tmux (auto|h|v, default: auto)\n --env: Extra env vars as JSON string\n --prompt-path: Path to prompt file for REPL-mode tools\n\nEXIT CODES\n 0 Success - AI assistant launched and exited successfully\n 1 General error - unexpected runtime failure\n 2 Invalid usage - check your arguments and flags\n 3 Environment error - CLI not found (install Claude Code from https://claude.ai/download, Codex from npm, Devin from https://cli.devin.ai)",
279
279
  "examples": [
280
280
  "<%= config.bin %> <%= command.id %> # Auto-launches tmux with a fresh session when not already in tmux",
281
281
  "<%= config.bin %> <%= command.id %> --codex # Launch Codex with --yolo flag",
282
- "<%= config.bin %> <%= command.id %> -c # Short form for --codex",
282
+ "<%= config.bin %> <%= command.id %> --devin # Launch Devin CLI with --permission-mode dangerous",
283
283
  "<%= config.bin %> <%= command.id %> --new # Launch in a new terminal window",
284
- "<%= config.bin %> <%= command.id %> -n # Short form for --new",
285
- "<%= config.bin %> <%= command.id %> --codex --new # Launch Codex in new terminal",
286
284
  "<%= config.bin %> <%= command.id %> --no-tmux # Run directly in current shell",
287
285
  "<%= config.bin %> <%= command.id %> --tmux-session aiw-main # Reuse/attach explicit tmux session name",
288
- "<%= config.bin %> <%= command.id %> --debug # Enable verbose logging",
289
- "# Check exit code in Bash\n<%= config.bin %> <%= command.id %>\necho $?",
290
- "# Check exit code in PowerShell\n<%= config.bin %> <%= command.id %>\necho $LASTEXITCODE"
286
+ "<%= config.bin %> <%= command.id %> --prompt \"Fix the login bug\" # Launch with initial prompt",
287
+ "<%= config.bin %> <%= command.id %> --wait --json # Block until pane exits, output JSON result",
288
+ "<%= config.bin %> <%= command.id %> --split h # Force horizontal split in tmux",
289
+ "<%= config.bin %> <%= command.id %> --debug # Enable verbose logging"
291
290
  ],
292
291
  "flags": {
293
292
  "debug": {
@@ -314,10 +313,37 @@
314
313
  "codex": {
315
314
  "char": "c",
316
315
  "description": "Launch Codex instead of Claude Code (uses --yolo flag for full auto mode)",
316
+ "exclusive": [
317
+ "devin"
318
+ ],
317
319
  "name": "codex",
318
320
  "allowNo": false,
319
321
  "type": "boolean"
320
322
  },
323
+ "devin": {
324
+ "char": "e",
325
+ "description": "Launch Devin CLI instead of Claude Code (uses --permission-mode dangerous)",
326
+ "exclusive": [
327
+ "codex"
328
+ ],
329
+ "name": "devin",
330
+ "allowNo": false,
331
+ "type": "boolean"
332
+ },
333
+ "env": {
334
+ "description": "Extra env vars as JSON object string (e.g. '{\"FOO\":\"bar\"}')",
335
+ "name": "env",
336
+ "required": false,
337
+ "hasDynamicHelp": false,
338
+ "multiple": false,
339
+ "type": "option"
340
+ },
341
+ "json": {
342
+ "description": "JSON output (paneId, backend, exitCode, sentinel)",
343
+ "name": "json",
344
+ "allowNo": false,
345
+ "type": "boolean"
346
+ },
321
347
  "new": {
322
348
  "char": "n",
323
349
  "description": "Open a new terminal in the current directory and run aiw launch there",
@@ -332,6 +358,53 @@
332
358
  "allowNo": false,
333
359
  "type": "boolean"
334
360
  },
361
+ "prompt": {
362
+ "char": "p",
363
+ "description": "Initial prompt to pass to the AI REPL at startup",
364
+ "name": "prompt",
365
+ "required": false,
366
+ "hasDynamicHelp": false,
367
+ "multiple": false,
368
+ "type": "option"
369
+ },
370
+ "prompt-file": {
371
+ "description": "Path to file containing initial prompt (internal)",
372
+ "hidden": true,
373
+ "name": "prompt-file",
374
+ "required": false,
375
+ "hasDynamicHelp": false,
376
+ "multiple": false,
377
+ "type": "option"
378
+ },
379
+ "spawned-window": {
380
+ "description": "Internal: marks launch as re-entered in a spawned terminal window",
381
+ "hidden": true,
382
+ "name": "spawned-window",
383
+ "required": false,
384
+ "allowNo": false,
385
+ "type": "boolean"
386
+ },
387
+ "prompt-path": {
388
+ "description": "Path to prompt file for REPL-mode tools",
389
+ "name": "prompt-path",
390
+ "required": false,
391
+ "hasDynamicHelp": false,
392
+ "multiple": false,
393
+ "type": "option"
394
+ },
395
+ "split": {
396
+ "description": "Split direction when in tmux (auto|h|v, default: auto)",
397
+ "name": "split",
398
+ "required": false,
399
+ "hasDynamicHelp": false,
400
+ "multiple": false,
401
+ "options": [
402
+ "auto",
403
+ "h",
404
+ "v"
405
+ ],
406
+ "type": "option"
407
+ },
335
408
  "tmux-session": {
336
409
  "char": "s",
337
410
  "description": "tmux session name to reuse when auto-launching tmux (default: new aiw-<current-dir>-<unique> session)",
@@ -340,6 +413,12 @@
340
413
  "hasDynamicHelp": false,
341
414
  "multiple": false,
342
415
  "type": "option"
416
+ },
417
+ "wait": {
418
+ "description": "Block until launched pane exits; output result",
419
+ "name": "wait",
420
+ "allowNo": false,
421
+ "type": "boolean"
343
422
  }
344
423
  },
345
424
  "hasDynamicHelp": false,
@@ -407,11 +486,8 @@
407
486
  },
408
487
  "ide": {
409
488
  "char": "i",
410
- "description": "IDEs to configure (specify multiple: --ide claude --ide windsurf)",
489
+ "description": "IDEs to configure. When omitted, uses all IDEs discovered in core + selected template",
411
490
  "name": "ide",
412
- "default": [
413
- "claude"
414
- ],
415
491
  "hasDynamicHelp": false,
416
492
  "multiple": true,
417
493
  "type": "option"
@@ -434,5 +510,5 @@
434
510
  ]
435
511
  }
436
512
  },
437
- "version": "0.15.5"
513
+ "version": "0.15.7"
438
514
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aiwcli",
3
3
  "description": "AI Workflow CLI - Command-line interface for AI-powered workflows",
4
- "version": "0.15.5",
4
+ "version": "0.15.7",
5
5
  "author": "jofu-tofu",
6
6
  "bin": {
7
7
  "aiw": "bin/run.js"
@@ -25,7 +25,6 @@
25
25
  "@eslint/compat": "^1",
26
26
  "@oclif/test": "^4",
27
27
  "@types/chai": "^4",
28
- "@types/mocha": "^10",
29
28
  "@types/node": "^18",
30
29
  "@types/sinon": "^21.0.0",
31
30
  "c8": "^10.1.3",
@@ -34,7 +33,6 @@
34
33
  "eslint": "^9",
35
34
  "eslint-config-oclif": "^6",
36
35
  "eslint-config-prettier": "^10",
37
- "mocha": "^10",
38
36
  "npm-run-all2": "^8.0.4",
39
37
  "oclif": "^4",
40
38
  "prettier": "^3.7.4",
@@ -43,7 +41,9 @@
43
41
  "stdout-stderr": "^0.1.13",
44
42
  "strip-ansi": "^7.1.2",
45
43
  "ts-node": "^10",
46
- "typescript": "^5"
44
+ "typescript": "^5",
45
+ "vitest": "^3.2.4",
46
+ "@vitest/coverage-v8": "^3.2.4"
47
47
  },
48
48
  "engines": {
49
49
  "node": ">=18.0.0"
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "scripts": {
84
84
  "build": "shx rm -rf dist && tsc -b && npm run build:templates",
85
- "build:templates": "shx mkdir -p dist/templates && shx cp -r src/templates/_shared dist/templates/ && shx cp -r src/templates/cc-native dist/templates/ && shx cp src/templates/CLAUDE.md dist/templates/",
85
+ "build:templates": "npm run sync:shared-lib && npm run sync:cc-native && shx mkdir -p dist/templates && shx cp -r src/templates/core dist/templates/ && shx cp -r src/templates/cc-native dist/templates/ && shx cp src/templates/CLAUDE.md dist/templates/",
86
86
  "build:watch": "tsc -b --watch",
87
87
  "check": "npm run lint && npm run build",
88
88
  "clean": "shx rm -rf dist",
@@ -96,14 +96,15 @@
96
96
  "posttest": "npm run lint",
97
97
  "prepack": "oclif manifest && oclif readme",
98
98
  "templates:watch": "node --loader ts-node/esm src/lib/watch-templates.ts",
99
- "test": "npm run test:build && mocha --forbid-only \"dist-test/test/**/*.test.js\"",
100
- "test:build": "tsc -p tsconfig.test.json && shx cp -r src/templates dist-test/src/",
101
- "test:coverage": "c8 npm test",
102
- "test:integration": "npm run test:build && mocha \"dist-test/test/integration/**/*.test.js\"",
103
- "test:unit": "npm run test:build && mocha \"dist-test/test/{commands,lib,types}/**/*.test.js\"",
104
- "test:watch": "run-p \"tsc -p tsconfig.test.json --watch\" \"mocha --watch dist-test/test/{commands,lib}/**/*.test.js\"",
99
+ "test": "npm run build && vitest run",
100
+ "test:coverage": "npm run build && vitest run --coverage",
101
+ "test:integration": "npm run build && vitest run test/integration/**/*.test.ts",
102
+ "test:unit": "npm run build && vitest run test/{commands,lib,types}/**/*.test.ts",
103
+ "test:watch": "vitest",
105
104
  "version": "oclif readme && git add README.md",
106
- "watch": "run-p dev:watch test:watch"
105
+ "watch": "run-p dev:watch test:watch",
106
+ "sync:cc-native": "node ./scripts/sync-cc-native.mjs",
107
+ "sync:shared-lib": "node ./scripts/sync-shared-lib.mjs"
107
108
  },
108
109
  "types": "dist/index.d.ts"
109
110
  }