aiwcli 0.15.4 → 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
@@ -1,120 +0,0 @@
1
- {
2
- "statusLine": {
3
- "type": "command",
4
- "command": "bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/scripts/status_line.ts"
5
- },
6
- "fileSuggestion": {
7
- "type": "command",
8
- "command": "bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/hooks-ts/file-suggestion.ts"
9
- },
10
- "hooks": {
11
- "UserPromptSubmit": [
12
- {
13
- "hooks": [
14
- {
15
- "type": "command",
16
- "command": "bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/hooks-ts/user_prompt_submit.ts",
17
- "timeout": 10000
18
- }
19
- ]
20
- }
21
- ],
22
- "PostToolUse": [
23
- {
24
- "matcher": "*",
25
- "hooks": [
26
- {
27
- "type": "command",
28
- "command": "bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/hooks-ts/context_monitor.ts",
29
- "timeout": 5000
30
- }
31
- ]
32
- },
33
- {
34
- "matcher": "TaskCreate",
35
- "hooks": [
36
- {
37
- "type": "command",
38
- "command": "bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/hooks-ts/task_create_capture.ts",
39
- "timeout": 3000
40
- }
41
- ]
42
- },
43
- {
44
- "matcher": "TaskUpdate",
45
- "hooks": [
46
- {
47
- "type": "command",
48
- "command": "bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/hooks-ts/task_update_capture.ts",
49
- "timeout": 3000
50
- }
51
- ]
52
- },
53
- {
54
- "matcher": "ExitPlanMode",
55
- "hooks": [
56
- {
57
- "type": "command",
58
- "command": "bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/hooks-ts/archive_plan.ts",
59
- "timeout": 5000
60
- }
61
- ]
62
- },
63
- {
64
- "matcher": "Write|Edit",
65
- "hooks": [
66
- {
67
- "type": "command",
68
- "command": "bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/hooks-ts/lint_after_edit.ts",
69
- "timeout": 10000
70
- }
71
- ]
72
- }
73
- ],
74
- "SessionStart": [
75
- {
76
- "hooks": [
77
- {
78
- "type": "command",
79
- "command": "bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/hooks-ts/session_start.ts",
80
- "timeout": 5000
81
- }
82
- ]
83
- }
84
- ],
85
- "SessionEnd": [
86
- {
87
- "hooks": [
88
- {
89
- "type": "command",
90
- "command": "bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/hooks-ts/session_end.ts",
91
- "timeout": 5000
92
- }
93
- ]
94
- }
95
- ],
96
- "PreCompact": [
97
- {
98
- "hooks": [
99
- {
100
- "type": "command",
101
- "command": "bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/hooks-ts/pre_compact.ts",
102
- "timeout": 5000
103
- }
104
- ]
105
- }
106
- ],
107
- "PermissionRequest": [
108
- {
109
- "matcher": "ExitPlanMode",
110
- "hooks": [
111
- {
112
- "type": "command",
113
- "command": "bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/hooks-ts/archive_plan.ts",
114
- "timeout": 5000
115
- }
116
- ]
117
- }
118
- ]
119
- }
120
- }
@@ -1,35 +0,0 @@
1
- ---
2
- name: codex
3
- description: Delegate implementation to Codex sub-agents. USE WHEN codex OR send to codex OR codex implement OR hand off to codex OR launch codex OR codex plan OR run codex.
4
- user-invocable: true
5
- ---
6
-
7
- Read `.aiwcli/_shared/skills/codex/SKILL.md` for delegation patterns and examples.
8
-
9
- ## Role
10
-
11
- You are the orchestrator. Codex instances are your implementation sub-agents. Decide what to delegate, how to split work, and review results when summaries arrive.
12
-
13
- ## Command
14
-
15
- ```
16
- bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/skills/codex/scripts/launch-codex.ts [flags] <mode>
17
- ```
18
-
19
- The script blocks until Codex exits and prints a summary — run with Bash `run_in_background: true` so you stay unblocked.
20
-
21
- **Modes:** `plan` | `--file <path>` | `<inline text...>`
22
-
23
- **Key flags:**
24
- - `--context <id>` — Project orientation. Pass when implementing a plan.
25
- - `--prompt <text>` — Scope the agent's work to a specific plan section or task.
26
- - `--model <name>` — `spark`, `codex`, `gpt`, or tier: `fast`, `standard`, `smart`.
27
- - `--no-watch` — Fire-and-forget (skip waiting for summary).
28
-
29
- ## Delegation Decision
30
-
31
- **One-shot:** Plan is small or tightly coupled → launch one Codex with `plan` mode. Wait for the summary, then review.
32
-
33
- **Parallel:** Plan has independent sections → launch multiple Codex instances, each scoped with `--prompt` to its section. All share the same `--context`. Review when summaries arrive, check for conflicts.
34
-
35
- **Ad-hoc:** No plan, just a task → pass inline text (e.g., `"Fix the failing test in auth.ts"`).
@@ -1,13 +0,0 @@
1
- ---
2
- name: handoff
3
- description: Create handoff document to preserve session context for future sessions
4
- user-invocable: true
5
- ---
6
-
7
- # Handoff
8
-
9
- Generate a comprehensive handoff document for the next session. See `.aiwcli/_shared/skills/handoff-system/workflows/handoff.md` for complete process documentation.
10
-
11
- **Quick trigger:** `/handoff` or `/handoff path/to/PLAN.md`
12
-
13
- The workflow guides you through gathering session context, generating structured sections, and saving via the handoff system.
@@ -1,13 +0,0 @@
1
- ---
2
- name: handoff-resume
3
- description: Restore context from a handoff document and create ISC tasks to continue work
4
- user-invocable: true
5
- ---
6
-
7
- # Resume Handoff
8
-
9
- Restore context from a handoff document and create ISC tasks. See `.aiwcli/_shared/skills/handoff-system/workflows/handoff-resume.md` for complete process documentation.
10
-
11
- **Quick trigger:** `/handoff-resume` or `/handoff-resume path/to/handoff`
12
-
13
- The workflow uses the resume script to load handoff sections and convert pending items to tasks.
@@ -1,43 +0,0 @@
1
- ---
2
- name: meta-plan
3
- description: Structured problem-solving workflow that chains thinking categories to produce comprehensive plans. USE WHEN complex problem OR large solution space OR high ambiguity OR multiple approaches OR choosing solution is harder than implementing OR need comprehensive plan OR meta-plan OR dissect problem OR chain thinking.
4
- user-invocable: true
5
- ---
6
-
7
- # MetaPlan
8
-
9
- Structured problem-solving workflow that chains thinking categories (decomposition, divergent ideation, convergent analysis, adversarial challenge, trade-off evaluation, expert synthesis, integration) to produce comprehensive plans for complex problems where choosing the right approach is harder than implementing it.
10
-
11
- ## Workflow Routing
12
-
13
- When a workflow is matched, **read its file and follow the steps within it.**
14
-
15
- | Workflow | Trigger | File |
16
- |----------|---------|------|
17
- | **MetaPlan** | "meta-plan", "chain thinking", "dissect problem", "comprehensive plan for complex problem" | `.aiwcli/_shared/skills/meta-plan/workflows/meta-plan.md` |
18
-
19
- ## Examples
20
-
21
- **Example 1: Complex architecture decision**
22
- ```
23
- User: "I need to add real-time updates to our app — not sure if we should use WebSockets, SSE, or polling"
24
- -> Invokes MetaPlan workflow
25
- -> Decomposes requirements, generates 3+ approaches, evaluates trade-offs, stress-tests leading option
26
- -> Produces structured plan with recommended approach, risk assessment, and actionable next steps
27
- ```
28
-
29
- **Example 2: Unfamiliar domain problem**
30
- ```
31
- User: "/meta-plan — We need to implement end-to-end encryption for our messaging feature"
32
- -> Invokes MetaPlan workflow
33
- -> Runs expert synthesis first (domain research), then divergent ideation, convergent analysis
34
- -> Produces plan grounded in domain best practices with approaches compared
35
- ```
36
-
37
- **Example 3: Multi-stakeholder trade-off**
38
- ```
39
- User: "Help me figure out the right approach for migrating our monolith to microservices"
40
- -> Invokes MetaPlan workflow
41
- -> Decision tree selects: Decomposition → Expert Synthesis → Trade-off → Adversarial → Integration
42
- -> Produces plan with explicit trade-offs, irreversible decisions flagged, and switching conditions
43
- ```
@@ -1,11 +0,0 @@
1
- # Codex Workflow
2
-
3
- Use Codex CLI handoff instructions from `.aiwcli/_shared/skills/codex/SKILL.md`.
4
-
5
- ## Command
6
-
7
- `bun ~/.aiwcli/bin/resolve-run.ts .aiwcli/_shared/skills/codex/scripts/launch-codex.ts [flags] <mode>`
8
-
9
- **Modes:** `plan` | `--file <path>` | `<inline text...>`
10
-
11
- **Common flags:** `--model <name>`, `--sandbox <mode>`, `--context <id>`, `--prompt <text>`, `--no-yolo`, `--capture`
@@ -1,226 +0,0 @@
1
- # Handoff Workflow
2
-
3
- Generate a handoff document summarizing the current session's work, decisions, and pending items. Optionally update a plan document to track completed vs remaining tasks.
4
-
5
- ## Triggers
6
-
7
- - `/handoff` command
8
- - `/handoff path/to/PLAN.md` - with plan document integration
9
- - Phrases like "write a handoff", "create a session summary", "document what we did", "end session with notes"
10
-
11
- ## Arguments
12
-
13
- - `$ARGUMENTS` - Optional path to a plan document. If provided, the handoff will:
14
- 1. Mark completed items in the plan with `[x]`
15
- 2. Add notes about partial progress
16
- 3. Append a "Session Progress" section to the plan
17
-
18
- ## Process
19
-
20
- ### Step 1: Get Context ID
21
-
22
- Extract the `context_id` from the system reminder injected by the context enforcer hook.
23
-
24
- Look for the pattern in the system reminder:
25
- ```
26
- Active Context: {context_id}
27
- ```
28
-
29
- If no active context is found, inform the user and stop - handoffs require an active context.
30
-
31
- ### Step 2: Gather Information
32
-
33
- 1. Review conversation history for:
34
- - Completed tasks and implementations
35
- - Key decisions and their rationale
36
- - Failed approaches (to avoid repeating)
37
- - External context (deadlines, stakeholder requirements)
38
-
39
- 2. Check git status if available:
40
- ```bash
41
- git status --short
42
- git diff --stat
43
- ```
44
-
45
- 3. Look for TODOs/FIXMEs mentioned in session
46
-
47
- 4. **If plan document provided**: Read the plan and identify:
48
- - Tasks that are now completed
49
- - Tasks that are partially done
50
- - Tasks that were attempted but blocked
51
- - New tasks discovered during implementation
52
-
53
- ### Step 3: Generate Document
54
-
55
- Use this template. The `<!-- SECTION: name -->` markers are required for the save script to parse sections into sharded files.
56
-
57
- ```markdown
58
- ---
59
- title: Session Handoff
60
- date: {ISO timestamp}
61
- session_id: {conversation ID if available}
62
- project: {project name from package.json, Cargo.toml, or directory name}
63
- context_id: {context_id from Step 1}
64
- plan_document: {path to plan if provided, or "none"}
65
- ---
66
-
67
- # Session Handoff — {Date}
68
-
69
- <!-- SECTION: summary -->
70
- ## Summary
71
- {2-3 sentences: what's different now vs. session start}
72
-
73
- <!-- SECTION: completed -->
74
- ## Work Completed
75
- {Grouped by category if multiple areas. Specific file:function references.}
76
-
77
- <!-- SECTION: dead-ends -->
78
- ## Dead Ends — Do Not Retry
79
-
80
- These approaches were attempted and failed. Do not retry without addressing the root cause.
81
-
82
- | Approach | Why It Failed | Time Spent | Alternative |
83
- |----------|---------------|------------|-------------|
84
- | {What was attempted} | {Specific reason} | {Rough estimate} | {What to try instead} |
85
-
86
- <!-- SECTION: decisions -->
87
- ## Key Decisions
88
- {Technical choices with rationale. Format: **Decision**: Rationale. Trade-off: X.}
89
-
90
- <!-- SECTION: pending -->
91
- ## Pending Issues
92
- - [ ] {Issue} — {severity: HIGH/MED/LOW} {optional workaround note}
93
-
94
- <!-- SECTION: next-steps -->
95
- ## Next Steps
96
- 1. {Actionable item with file:line reference if applicable}
97
-
98
- <!-- SECTION: files -->
99
- ## Files Modified
100
- {Significant changes only. Skip formatting-only edits.}
101
-
102
- <!-- SECTION: context -->
103
- ## Context for Future Sessions
104
- {Non-obvious context: env quirks, stakeholder requirements}
105
-
106
- ```
107
-
108
- ### Step 4: Update Plan Document (if provided)
109
-
110
- If a plan document path was provided in `$ARGUMENTS`:
111
-
112
- 1. **Read the plan document**
113
- 2. **Identify completed items**:
114
- - Find checkboxes `- [ ]` that match completed work
115
- - Change them to `- [x]`
116
- 3. **Add progress notes** to items that are partially complete:
117
- - Append `(partial: {brief status})` to the line
118
- 4. **Append Session Progress section** at the bottom:
119
-
120
- ```markdown
121
-
122
- ---
123
-
124
- ## Session Progress Log
125
-
126
- ### {Date} — Session {session_id or timestamp}
127
-
128
- **Completed this session:**
129
- - [x] {Task from plan that was completed}
130
- - [x] {Another completed task}
131
-
132
- **Partially completed:**
133
- - {Task} — {current state, what remains}
134
-
135
- **Blocked/Deferred:**
136
- - {Task} — {reason, what's needed}
137
-
138
- **New items discovered:**
139
- - [ ] {New task not in original plan}
140
- - [ ] {Another new task}
141
-
142
- ---
143
- ```
144
-
145
- 5. **If no plan document was provided**:
146
- - Skip plan creation - the handoff document serves as the session record
147
-
148
- ### Step 5: Save and Update Status
149
-
150
- Instead of writing the file directly, pipe your handoff content to the save script:
151
-
152
- ```bash
153
- bun .aiwcli/_shared/skills/handoff-system/scripts/save_handoff.ts "{context_id}" <<'EOF'
154
- {Your complete handoff markdown content from Step 3}
155
- EOF
156
- ```
157
-
158
- This script:
159
- 1. Creates a folder at `_output/contexts/{context_id}/handoffs/{YYYY-MM-DD-HHMM}/`
160
- 2. Parses sections and writes sharded files (index.md, completed-work.md, dead-ends.md, etc.)
161
- 3. Copies the current plan (if any) to plan.md
162
- 4. Records the event in the context's event log (informational only)
163
-
164
- Use the handoff folder for context in the next session.
165
-
166
- ## Dead Ends Section Guidelines
167
-
168
- This section is critical for preventing context rot across sessions. Be specific:
169
-
170
- **Bad (too vague):**
171
- > - Tried using library X, didn't work
172
-
173
- **Good (actionable):**
174
- > ### Fixing the race condition in SessionStore
175
- > | Approach Tried | Why It Failed |
176
- > |----------------|---------------|
177
- > | `async-mutex` package | Deadlock when nested calls to `getSession()` |
178
- > | Redis WATCH/MULTI | Our Redis 6.x cluster doesn't support WATCH in cluster mode |
179
- > | In-memory lock Map | Works single-node but breaks in horizontal scaling |
180
- >
181
- > **What to try instead**: Upgrade to Redis 7.x which supports WATCH in cluster mode, or use Redlock algorithm
182
-
183
- **Capture these dead ends:**
184
- - Packages/libraries that had incompatibilities
185
- - Approaches that caused new bugs or regressions
186
- - Solutions that worked locally but failed in CI/staging/prod
187
- - Configurations that conflicted with existing setup
188
- - Rabbit holes that consumed significant time without progress
189
-
190
- ## Post-Generation Output
191
-
192
- After creating file, output:
193
-
194
- ```
195
- ✓ Created handoff folder: _output/contexts/{context_id}/handoffs/{YYYY-MM-DD-HHMM}/
196
- - index.md (entry point with navigation)
197
- - completed-work.md, dead-ends.md, decisions.md, pending.md, context.md
198
- - plan.md (copy of current plan, if any)
199
-
200
- To continue next session:
201
- The index.md will be automatically suggested when you start a new session.
202
- Read dead-ends.md first to avoid repeating failed approaches.
203
-
204
- ⚠️ {N} dead ends documented — avoid re-attempting these approaches
205
- ```
206
-
207
- If plan was updated:
208
- ```
209
- ✓ Updated plan document: {path}
210
- - {N} items marked complete
211
- - {N} items partially complete
212
- - {N} new items added
213
- ```
214
-
215
- ## Success Criteria
216
-
217
- - [ ] Handoff folder created at `handoffs/{YYYY-MM-DD-HHMM}/`
218
- - [ ] index.md contains summary and navigation table
219
- - [ ] All section files created (completed-work.md, dead-ends.md, etc.)
220
- - [ ] Dead ends use structured table format for quick scanning
221
- - [ ] plan.md copied from context if plan exists
222
- - [ ] Next steps are actionable with file references
223
- - [ ] Git status included in index.md
224
- - [ ] If plan provided: checkboxes updated to reflect completion status
225
- - [ ] If plan provided: Session Progress Log appended
226
- - [ ] Context state updated to indicate handoff pending