@nexus-cortex/cli 4.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (465) hide show
  1. package/.cortex/agents/AGENT_PROFILE_GUIDE.md +307 -0
  2. package/.cortex/agents/README.md +268 -0
  3. package/.cortex/agents/a-frontend-landing-page-designer.md +41 -0
  4. package/.cortex/agents/autoresearch-agent.md +49 -0
  5. package/.cortex/agents/code-reviewer.md +63 -0
  6. package/.cortex/agents/context-research.md +26 -0
  7. package/.cortex/agents/doc-writer.md +92 -0
  8. package/.cortex/agents/explore.md +63 -0
  9. package/.cortex/agents/new-model-api-integrator-analyst.md +41 -0
  10. package/.cortex/agents/plan.md +109 -0
  11. package/.cortex/agents/pr-architecture-reviewer.md +77 -0
  12. package/.cortex/agents/pr-code-quality.md +78 -0
  13. package/.cortex/agents/pr-implementer.md +50 -0
  14. package/.cortex/agents/pr-security-auditor.md +62 -0
  15. package/.cortex/agents/pr-test-writer.md +67 -0
  16. package/.cortex/agents/refactor.md +118 -0
  17. package/.cortex/agents/test-writer.md +72 -0
  18. package/.cortex/agents/web-researcher.md +72 -0
  19. package/.cortex/bench/tasks/sample-tasks.json +20 -0
  20. package/.cortex/commands/compare.md +14 -0
  21. package/.cortex/commands/deps.md +16 -0
  22. package/.cortex/commands/diff.md +14 -0
  23. package/.cortex/commands/explain.md +16 -0
  24. package/.cortex/commands/find-bug.md +13 -0
  25. package/.cortex/commands/profile.md +15 -0
  26. package/.cortex/commands/review.md +18 -0
  27. package/.cortex/commands/search.md +16 -0
  28. package/.cortex/commands/test.md +15 -0
  29. package/.cortex/permissions.dev.json +20 -0
  30. package/.cortex/permissions.example.json +71 -0
  31. package/.cortex/permissions.prod.json +63 -0
  32. package/.cortex/permissions.test.json +19 -0
  33. package/.cortex/skills/autoresearch/SKILL.md +77 -0
  34. package/.cortex/skills/autoresearch/personas/README.md +45 -0
  35. package/.cortex/skills/autoresearch/personas/aggressive-refactor.md +25 -0
  36. package/.cortex/skills/autoresearch/personas/creative.md +29 -0
  37. package/.cortex/skills/autoresearch/personas/perf-hunter.md +27 -0
  38. package/.cortex/skills/autoresearch/personas/precise.md +23 -0
  39. package/.cortex/skills/autoresearch/personas/root-cause.md +26 -0
  40. package/.cortex/skills/autoresearch/personas/security-auditor.md +29 -0
  41. package/.cortex/skills/autoresearch/personas/skeptic-reviewer.md +31 -0
  42. package/.cortex/skills/autoresearch/personas/test-first.md +25 -0
  43. package/.cortex/skills/best-of-n/SKILL.md +76 -0
  44. package/.cortex/skills/cortex/SKILL.md +834 -0
  45. package/.cortex/skills/cortex-bench/SKILL.md +354 -0
  46. package/.cortex/skills/docx/SKILL.md +83 -0
  47. package/.cortex/skills/pdf-documents/SKILL.md +297 -0
  48. package/.cortex/skills/pdf-documents/sections/01-image-acquisition.md +132 -0
  49. package/.cortex/skills/pdf-documents/sections/02-ai-image-generation.md +274 -0
  50. package/.cortex/skills/pdf-documents/sections/03-paper-sizes.md +89 -0
  51. package/.cortex/skills/pdf-documents/sections/04-design-system.md +549 -0
  52. package/.cortex/skills/pdf-documents/sections/05-css-print-rules.md +135 -0
  53. package/.cortex/skills/pdf-documents/sections/06-svg-charts.md +100 -0
  54. package/.cortex/skills/pdf-documents/sections/07-templates.md +224 -0
  55. package/.cortex/skills/pdf-documents/sections/08-scaled-output.md +164 -0
  56. package/.cortex/skills/pdf-documents/sections/09-preview-qa.md +66 -0
  57. package/.cortex/skills/pdf-documents/sections/10-reading-pdfs.md +499 -0
  58. package/.cortex/skills/pdf-documents/sections/11-form-filling.md +241 -0
  59. package/.cortex/skills/pptx/SKILL.md +90 -0
  60. package/.cortex/skills/resume-analyst/SKILL.md +373 -0
  61. package/.cortex/skills/verify-work/SKILL.md +74 -0
  62. package/.cortex/skills/xlsx/SKILL.md +101 -0
  63. package/.cortex/system-messages/messages/WORK_QUALITY.md +159 -0
  64. package/.cortex/system-messages/registry.json +18 -0
  65. package/LICENSE +202 -0
  66. package/NOTICE +2 -0
  67. package/README.md +13 -0
  68. package/bin/cortex.js +548 -0
  69. package/dist/agent-mode.d.ts +21 -0
  70. package/dist/agent-mode.d.ts.map +1 -0
  71. package/dist/agent-mode.js +511 -0
  72. package/dist/agent-mode.js.map +1 -0
  73. package/dist/client/CortexClient.d.ts +84 -0
  74. package/dist/client/CortexClient.d.ts.map +1 -0
  75. package/dist/client/CortexClient.js +163 -0
  76. package/dist/client/CortexClient.js.map +1 -0
  77. package/dist/commands/artifact/list.d.ts +15 -0
  78. package/dist/commands/artifact/list.d.ts.map +1 -0
  79. package/dist/commands/artifact/list.js +89 -0
  80. package/dist/commands/artifact/list.js.map +1 -0
  81. package/dist/commands/artifact/restart.d.ts +13 -0
  82. package/dist/commands/artifact/restart.d.ts.map +1 -0
  83. package/dist/commands/artifact/restart.js +56 -0
  84. package/dist/commands/artifact/restart.js.map +1 -0
  85. package/dist/commands/artifact/status.d.ts +13 -0
  86. package/dist/commands/artifact/status.d.ts.map +1 -0
  87. package/dist/commands/artifact/status.js +100 -0
  88. package/dist/commands/artifact/status.js.map +1 -0
  89. package/dist/commands/artifact/stop.d.ts +13 -0
  90. package/dist/commands/artifact/stop.d.ts.map +1 -0
  91. package/dist/commands/artifact/stop.js +50 -0
  92. package/dist/commands/artifact/stop.js.map +1 -0
  93. package/dist/commands/autoresearch/bench.d.ts +32 -0
  94. package/dist/commands/autoresearch/bench.d.ts.map +1 -0
  95. package/dist/commands/autoresearch/bench.js +123 -0
  96. package/dist/commands/autoresearch/bench.js.map +1 -0
  97. package/dist/commands/autoresearch/commandRunner.d.ts +35 -0
  98. package/dist/commands/autoresearch/commandRunner.d.ts.map +1 -0
  99. package/dist/commands/autoresearch/commandRunner.js +91 -0
  100. package/dist/commands/autoresearch/commandRunner.js.map +1 -0
  101. package/dist/commands/autoresearch/evaluate.d.ts +18 -0
  102. package/dist/commands/autoresearch/evaluate.d.ts.map +1 -0
  103. package/dist/commands/autoresearch/evaluate.js +117 -0
  104. package/dist/commands/autoresearch/evaluate.js.map +1 -0
  105. package/dist/commands/autoresearch/experiment.d.ts +38 -0
  106. package/dist/commands/autoresearch/experiment.d.ts.map +1 -0
  107. package/dist/commands/autoresearch/experiment.js +168 -0
  108. package/dist/commands/autoresearch/experiment.js.map +1 -0
  109. package/dist/commands/autoresearch/fix.d.ts +10 -0
  110. package/dist/commands/autoresearch/fix.d.ts.map +1 -0
  111. package/dist/commands/autoresearch/fix.js +86 -0
  112. package/dist/commands/autoresearch/fix.js.map +1 -0
  113. package/dist/commands/autoresearch/harnessProcess.d.ts +48 -0
  114. package/dist/commands/autoresearch/harnessProcess.d.ts.map +1 -0
  115. package/dist/commands/autoresearch/harnessProcess.js +140 -0
  116. package/dist/commands/autoresearch/harnessProcess.js.map +1 -0
  117. package/dist/commands/autoresearch/list.d.ts +6 -0
  118. package/dist/commands/autoresearch/list.d.ts.map +1 -0
  119. package/dist/commands/autoresearch/list.js +38 -0
  120. package/dist/commands/autoresearch/list.js.map +1 -0
  121. package/dist/commands/autoresearch/loop.d.ts +26 -0
  122. package/dist/commands/autoresearch/loop.d.ts.map +1 -0
  123. package/dist/commands/autoresearch/loop.js +242 -0
  124. package/dist/commands/autoresearch/loop.js.map +1 -0
  125. package/dist/commands/cache/metrics.d.ts +13 -0
  126. package/dist/commands/cache/metrics.d.ts.map +1 -0
  127. package/dist/commands/cache/metrics.js +77 -0
  128. package/dist/commands/cache/metrics.js.map +1 -0
  129. package/dist/commands/chat/AgenticChat.d.ts +39 -0
  130. package/dist/commands/chat/AgenticChat.d.ts.map +1 -0
  131. package/dist/commands/chat/AgenticChat.js +201 -0
  132. package/dist/commands/chat/AgenticChat.js.map +1 -0
  133. package/dist/commands/chat/renderers/CodeRenderer.d.ts +36 -0
  134. package/dist/commands/chat/renderers/CodeRenderer.d.ts.map +1 -0
  135. package/dist/commands/chat/renderers/CodeRenderer.js +85 -0
  136. package/dist/commands/chat/renderers/CodeRenderer.js.map +1 -0
  137. package/dist/commands/chat/renderers/ToolRenderer.d.ts +30 -0
  138. package/dist/commands/chat/renderers/ToolRenderer.d.ts.map +1 -0
  139. package/dist/commands/chat/renderers/ToolRenderer.js +93 -0
  140. package/dist/commands/chat/renderers/ToolRenderer.js.map +1 -0
  141. package/dist/commands/chat/single-message.d.ts +15 -0
  142. package/dist/commands/chat/single-message.d.ts.map +1 -0
  143. package/dist/commands/chat/single-message.js +85 -0
  144. package/dist/commands/chat/single-message.js.map +1 -0
  145. package/dist/commands/config/categories.d.ts +8 -0
  146. package/dist/commands/config/categories.d.ts.map +1 -0
  147. package/dist/commands/config/categories.js +75 -0
  148. package/dist/commands/config/categories.js.map +1 -0
  149. package/dist/commands/config/category.d.ts +8 -0
  150. package/dist/commands/config/category.d.ts.map +1 -0
  151. package/dist/commands/config/category.js +81 -0
  152. package/dist/commands/config/category.js.map +1 -0
  153. package/dist/commands/config/get.d.ts +9 -0
  154. package/dist/commands/config/get.d.ts.map +1 -0
  155. package/dist/commands/config/get.js +98 -0
  156. package/dist/commands/config/get.js.map +1 -0
  157. package/dist/commands/config/reset.d.ts +6 -0
  158. package/dist/commands/config/reset.d.ts.map +1 -0
  159. package/dist/commands/config/reset.js +68 -0
  160. package/dist/commands/config/reset.js.map +1 -0
  161. package/dist/commands/config/set.d.ts +6 -0
  162. package/dist/commands/config/set.d.ts.map +1 -0
  163. package/dist/commands/config/set.js +60 -0
  164. package/dist/commands/config/set.js.map +1 -0
  165. package/dist/commands/config/utils.d.ts +14 -0
  166. package/dist/commands/config/utils.d.ts.map +1 -0
  167. package/dist/commands/config/utils.js +54 -0
  168. package/dist/commands/config/utils.js.map +1 -0
  169. package/dist/commands/context/boundaries.d.ts +13 -0
  170. package/dist/commands/context/boundaries.d.ts.map +1 -0
  171. package/dist/commands/context/boundaries.js +45 -0
  172. package/dist/commands/context/boundaries.js.map +1 -0
  173. package/dist/commands/context/compact.d.ts +13 -0
  174. package/dist/commands/context/compact.d.ts.map +1 -0
  175. package/dist/commands/context/compact.js +41 -0
  176. package/dist/commands/context/compact.js.map +1 -0
  177. package/dist/commands/context/savings.d.ts +13 -0
  178. package/dist/commands/context/savings.d.ts.map +1 -0
  179. package/dist/commands/context/savings.js +49 -0
  180. package/dist/commands/context/savings.js.map +1 -0
  181. package/dist/commands/context/status.d.ts +13 -0
  182. package/dist/commands/context/status.d.ts.map +1 -0
  183. package/dist/commands/context/status.js +52 -0
  184. package/dist/commands/context/status.js.map +1 -0
  185. package/dist/commands/context/strategy.d.ts +13 -0
  186. package/dist/commands/context/strategy.d.ts.map +1 -0
  187. package/dist/commands/context/strategy.js +66 -0
  188. package/dist/commands/context/strategy.js.map +1 -0
  189. package/dist/commands/mcp/disable.d.ts +5 -0
  190. package/dist/commands/mcp/disable.d.ts.map +1 -0
  191. package/dist/commands/mcp/disable.js +26 -0
  192. package/dist/commands/mcp/disable.js.map +1 -0
  193. package/dist/commands/mcp/edit.d.ts +9 -0
  194. package/dist/commands/mcp/edit.d.ts.map +1 -0
  195. package/dist/commands/mcp/edit.js +62 -0
  196. package/dist/commands/mcp/edit.js.map +1 -0
  197. package/dist/commands/mcp/enable.d.ts +5 -0
  198. package/dist/commands/mcp/enable.d.ts.map +1 -0
  199. package/dist/commands/mcp/enable.js +27 -0
  200. package/dist/commands/mcp/enable.js.map +1 -0
  201. package/dist/commands/mcp/init.d.ts +9 -0
  202. package/dist/commands/mcp/init.d.ts.map +1 -0
  203. package/dist/commands/mcp/init.js +97 -0
  204. package/dist/commands/mcp/init.js.map +1 -0
  205. package/dist/commands/mcp/list.d.ts +6 -0
  206. package/dist/commands/mcp/list.d.ts.map +1 -0
  207. package/dist/commands/mcp/list.js +56 -0
  208. package/dist/commands/mcp/list.js.map +1 -0
  209. package/dist/commands/mcp/server.d.ts +6 -0
  210. package/dist/commands/mcp/server.d.ts.map +1 -0
  211. package/dist/commands/mcp/server.js +44 -0
  212. package/dist/commands/mcp/server.js.map +1 -0
  213. package/dist/commands/mcp/status.d.ts +6 -0
  214. package/dist/commands/mcp/status.d.ts.map +1 -0
  215. package/dist/commands/mcp/status.js +43 -0
  216. package/dist/commands/mcp/status.js.map +1 -0
  217. package/dist/commands/mcp/tools.d.ts +7 -0
  218. package/dist/commands/mcp/tools.d.ts.map +1 -0
  219. package/dist/commands/mcp/tools.js +82 -0
  220. package/dist/commands/mcp/tools.js.map +1 -0
  221. package/dist/commands/mcp/validate.d.ts +8 -0
  222. package/dist/commands/mcp/validate.d.ts.map +1 -0
  223. package/dist/commands/mcp/validate.js +121 -0
  224. package/dist/commands/mcp/validate.js.map +1 -0
  225. package/dist/commands/middleware/config.d.ts +13 -0
  226. package/dist/commands/middleware/config.d.ts.map +1 -0
  227. package/dist/commands/middleware/config.js +87 -0
  228. package/dist/commands/middleware/config.js.map +1 -0
  229. package/dist/commands/middleware/disable.d.ts +13 -0
  230. package/dist/commands/middleware/disable.d.ts.map +1 -0
  231. package/dist/commands/middleware/disable.js +50 -0
  232. package/dist/commands/middleware/disable.js.map +1 -0
  233. package/dist/commands/middleware/enable.d.ts +13 -0
  234. package/dist/commands/middleware/enable.d.ts.map +1 -0
  235. package/dist/commands/middleware/enable.js +50 -0
  236. package/dist/commands/middleware/enable.js.map +1 -0
  237. package/dist/commands/middleware/list.d.ts +13 -0
  238. package/dist/commands/middleware/list.d.ts.map +1 -0
  239. package/dist/commands/middleware/list.js +64 -0
  240. package/dist/commands/middleware/list.js.map +1 -0
  241. package/dist/commands/middleware/status.d.ts +13 -0
  242. package/dist/commands/middleware/status.d.ts.map +1 -0
  243. package/dist/commands/middleware/status.js +80 -0
  244. package/dist/commands/middleware/status.js.map +1 -0
  245. package/dist/commands/models/compare.d.ts +9 -0
  246. package/dist/commands/models/compare.d.ts.map +1 -0
  247. package/dist/commands/models/compare.js +76 -0
  248. package/dist/commands/models/compare.js.map +1 -0
  249. package/dist/commands/models/cost.d.ts +9 -0
  250. package/dist/commands/models/cost.d.ts.map +1 -0
  251. package/dist/commands/models/cost.js +64 -0
  252. package/dist/commands/models/cost.js.map +1 -0
  253. package/dist/commands/models/info.d.ts +9 -0
  254. package/dist/commands/models/info.d.ts.map +1 -0
  255. package/dist/commands/models/info.js +61 -0
  256. package/dist/commands/models/info.js.map +1 -0
  257. package/dist/commands/models/list.d.ts +6 -0
  258. package/dist/commands/models/list.d.ts.map +1 -0
  259. package/dist/commands/models/list.js +66 -0
  260. package/dist/commands/models/list.js.map +1 -0
  261. package/dist/commands/models/providers.d.ts +13 -0
  262. package/dist/commands/models/providers.d.ts.map +1 -0
  263. package/dist/commands/models/providers.js +45 -0
  264. package/dist/commands/models/providers.js.map +1 -0
  265. package/dist/commands/models/search.d.ts +10 -0
  266. package/dist/commands/models/search.d.ts.map +1 -0
  267. package/dist/commands/models/search.js +56 -0
  268. package/dist/commands/models/search.js.map +1 -0
  269. package/dist/commands/models/switch.d.ts +14 -0
  270. package/dist/commands/models/switch.d.ts.map +1 -0
  271. package/dist/commands/models/switch.js +67 -0
  272. package/dist/commands/models/switch.js.map +1 -0
  273. package/dist/commands/permissions/auto-approve.d.ts +13 -0
  274. package/dist/commands/permissions/auto-approve.d.ts.map +1 -0
  275. package/dist/commands/permissions/auto-approve.js +53 -0
  276. package/dist/commands/permissions/auto-approve.js.map +1 -0
  277. package/dist/commands/permissions/grant.d.ts +13 -0
  278. package/dist/commands/permissions/grant.d.ts.map +1 -0
  279. package/dist/commands/permissions/grant.js +46 -0
  280. package/dist/commands/permissions/grant.js.map +1 -0
  281. package/dist/commands/permissions/mode.d.ts +12 -0
  282. package/dist/commands/permissions/mode.d.ts.map +1 -0
  283. package/dist/commands/permissions/mode.js +61 -0
  284. package/dist/commands/permissions/mode.js.map +1 -0
  285. package/dist/commands/permissions/policies.d.ts +13 -0
  286. package/dist/commands/permissions/policies.d.ts.map +1 -0
  287. package/dist/commands/permissions/policies.js +47 -0
  288. package/dist/commands/permissions/policies.js.map +1 -0
  289. package/dist/commands/permissions/revoke.d.ts +13 -0
  290. package/dist/commands/permissions/revoke.d.ts.map +1 -0
  291. package/dist/commands/permissions/revoke.js +46 -0
  292. package/dist/commands/permissions/revoke.js.map +1 -0
  293. package/dist/commands/permissions/set.d.ts +13 -0
  294. package/dist/commands/permissions/set.d.ts.map +1 -0
  295. package/dist/commands/permissions/set.js +57 -0
  296. package/dist/commands/permissions/set.js.map +1 -0
  297. package/dist/commands/permissions/tools.d.ts +13 -0
  298. package/dist/commands/permissions/tools.d.ts.map +1 -0
  299. package/dist/commands/permissions/tools.js +50 -0
  300. package/dist/commands/permissions/tools.js.map +1 -0
  301. package/dist/commands/server/start.d.ts +11 -0
  302. package/dist/commands/server/start.d.ts.map +1 -0
  303. package/dist/commands/server/start.js +58 -0
  304. package/dist/commands/server/start.js.map +1 -0
  305. package/dist/commands/session/checkpoints.d.ts +6 -0
  306. package/dist/commands/session/checkpoints.d.ts.map +1 -0
  307. package/dist/commands/session/checkpoints.js +41 -0
  308. package/dist/commands/session/checkpoints.js.map +1 -0
  309. package/dist/commands/session/compact.d.ts +13 -0
  310. package/dist/commands/session/compact.d.ts.map +1 -0
  311. package/dist/commands/session/compact.js +56 -0
  312. package/dist/commands/session/compact.js.map +1 -0
  313. package/dist/commands/session/export.d.ts +6 -0
  314. package/dist/commands/session/export.d.ts.map +1 -0
  315. package/dist/commands/session/export.js +31 -0
  316. package/dist/commands/session/export.js.map +1 -0
  317. package/dist/commands/session/list.d.ts +7 -0
  318. package/dist/commands/session/list.d.ts.map +1 -0
  319. package/dist/commands/session/list.js +63 -0
  320. package/dist/commands/session/list.js.map +1 -0
  321. package/dist/commands/session/new.d.ts +8 -0
  322. package/dist/commands/session/new.d.ts.map +1 -0
  323. package/dist/commands/session/new.js +23 -0
  324. package/dist/commands/session/new.js.map +1 -0
  325. package/dist/commands/session/resume.d.ts +6 -0
  326. package/dist/commands/session/resume.d.ts.map +1 -0
  327. package/dist/commands/session/resume.js +32 -0
  328. package/dist/commands/session/resume.js.map +1 -0
  329. package/dist/commands/session/search.d.ts +10 -0
  330. package/dist/commands/session/search.d.ts.map +1 -0
  331. package/dist/commands/session/search.js +65 -0
  332. package/dist/commands/session/search.js.map +1 -0
  333. package/dist/commands/session/stats.d.ts +6 -0
  334. package/dist/commands/session/stats.d.ts.map +1 -0
  335. package/dist/commands/session/stats.js +58 -0
  336. package/dist/commands/session/stats.js.map +1 -0
  337. package/dist/commands/session/view.d.ts +6 -0
  338. package/dist/commands/session/view.d.ts.map +1 -0
  339. package/dist/commands/session/view.js +65 -0
  340. package/dist/commands/session/view.js.map +1 -0
  341. package/dist/commands/slash/CommandPalette.d.ts +60 -0
  342. package/dist/commands/slash/CommandPalette.d.ts.map +1 -0
  343. package/dist/commands/slash/CommandPalette.js +351 -0
  344. package/dist/commands/slash/CommandPalette.js.map +1 -0
  345. package/dist/commands/slash/SlashCommandParser.d.ts +11 -0
  346. package/dist/commands/slash/SlashCommandParser.d.ts.map +1 -0
  347. package/dist/commands/slash/SlashCommandParser.js +11 -0
  348. package/dist/commands/slash/SlashCommandParser.js.map +1 -0
  349. package/dist/commands/slash/SlashCommandRegistry.d.ts +11 -0
  350. package/dist/commands/slash/SlashCommandRegistry.d.ts.map +1 -0
  351. package/dist/commands/slash/SlashCommandRegistry.js +11 -0
  352. package/dist/commands/slash/SlashCommandRegistry.js.map +1 -0
  353. package/dist/commands/slash/index.d.ts +11 -0
  354. package/dist/commands/slash/index.d.ts.map +1 -0
  355. package/dist/commands/slash/index.js +13 -0
  356. package/dist/commands/slash/index.js.map +1 -0
  357. package/dist/commands/system-messages/list.d.ts +13 -0
  358. package/dist/commands/system-messages/list.d.ts.map +1 -0
  359. package/dist/commands/system-messages/list.js +54 -0
  360. package/dist/commands/system-messages/list.js.map +1 -0
  361. package/dist/commands/system-messages/reload.d.ts +13 -0
  362. package/dist/commands/system-messages/reload.d.ts.map +1 -0
  363. package/dist/commands/system-messages/reload.js +36 -0
  364. package/dist/commands/system-messages/reload.js.map +1 -0
  365. package/dist/commands/system-messages/view.d.ts +13 -0
  366. package/dist/commands/system-messages/view.d.ts.map +1 -0
  367. package/dist/commands/system-messages/view.js +52 -0
  368. package/dist/commands/system-messages/view.js.map +1 -0
  369. package/dist/commands/tmux/list.d.ts +13 -0
  370. package/dist/commands/tmux/list.d.ts.map +1 -0
  371. package/dist/commands/tmux/list.js +68 -0
  372. package/dist/commands/tmux/list.js.map +1 -0
  373. package/dist/commands/tools/info.d.ts +13 -0
  374. package/dist/commands/tools/info.d.ts.map +1 -0
  375. package/dist/commands/tools/info.js +82 -0
  376. package/dist/commands/tools/info.js.map +1 -0
  377. package/dist/commands/tools/list.d.ts +14 -0
  378. package/dist/commands/tools/list.d.ts.map +1 -0
  379. package/dist/commands/tools/list.js +67 -0
  380. package/dist/commands/tools/list.js.map +1 -0
  381. package/dist/config/ConfigManager.d.ts +40 -0
  382. package/dist/config/ConfigManager.d.ts.map +1 -0
  383. package/dist/config/ConfigManager.js +162 -0
  384. package/dist/config/ConfigManager.js.map +1 -0
  385. package/dist/config/extension.d.ts +12 -0
  386. package/dist/config/extension.d.ts.map +1 -0
  387. package/dist/config/extension.js +5 -0
  388. package/dist/config/extension.js.map +1 -0
  389. package/dist/config/settings.d.ts +42 -0
  390. package/dist/config/settings.d.ts.map +1 -0
  391. package/dist/config/settings.js +32 -0
  392. package/dist/config/settings.js.map +1 -0
  393. package/dist/index.d.ts +3 -0
  394. package/dist/index.d.ts.map +1 -0
  395. package/dist/index.js +883 -0
  396. package/dist/index.js.map +1 -0
  397. package/dist/orchestrator/OrchestratorClient.d.ts +385 -0
  398. package/dist/orchestrator/OrchestratorClient.d.ts.map +1 -0
  399. package/dist/orchestrator/OrchestratorClient.js +1195 -0
  400. package/dist/orchestrator/OrchestratorClient.js.map +1 -0
  401. package/dist/themes/DefaultTheme.d.ts +9 -0
  402. package/dist/themes/DefaultTheme.d.ts.map +1 -0
  403. package/dist/themes/DefaultTheme.js +29 -0
  404. package/dist/themes/DefaultTheme.js.map +1 -0
  405. package/dist/themes/MinimalTheme.d.ts +9 -0
  406. package/dist/themes/MinimalTheme.d.ts.map +1 -0
  407. package/dist/themes/MinimalTheme.js +29 -0
  408. package/dist/themes/MinimalTheme.js.map +1 -0
  409. package/dist/themes/Theme.interface.d.ts +36 -0
  410. package/dist/themes/Theme.interface.d.ts.map +1 -0
  411. package/dist/themes/Theme.interface.js +5 -0
  412. package/dist/themes/Theme.interface.js.map +1 -0
  413. package/dist/themes/ThemeManager.d.ts +63 -0
  414. package/dist/themes/ThemeManager.d.ts.map +1 -0
  415. package/dist/themes/ThemeManager.js +257 -0
  416. package/dist/themes/ThemeManager.js.map +1 -0
  417. package/dist/themes/colors.d.ts +108 -0
  418. package/dist/themes/colors.d.ts.map +1 -0
  419. package/dist/themes/colors.js +284 -0
  420. package/dist/themes/colors.js.map +1 -0
  421. package/dist/themes/createTheme.d.ts +40 -0
  422. package/dist/themes/createTheme.d.ts.map +1 -0
  423. package/dist/themes/createTheme.js +114 -0
  424. package/dist/themes/createTheme.js.map +1 -0
  425. package/dist/themes/themeDefinitions.d.ts +27 -0
  426. package/dist/themes/themeDefinitions.d.ts.map +1 -0
  427. package/dist/themes/themeDefinitions.js +244 -0
  428. package/dist/themes/themeDefinitions.js.map +1 -0
  429. package/dist/utils/CodeDiffRenderer.d.ts +124 -0
  430. package/dist/utils/CodeDiffRenderer.d.ts.map +1 -0
  431. package/dist/utils/CodeDiffRenderer.js +257 -0
  432. package/dist/utils/CodeDiffRenderer.js.map +1 -0
  433. package/dist/utils/MarkdownRenderer.d.ts +74 -0
  434. package/dist/utils/MarkdownRenderer.d.ts.map +1 -0
  435. package/dist/utils/MarkdownRenderer.js +260 -0
  436. package/dist/utils/MarkdownRenderer.js.map +1 -0
  437. package/dist/utils/MessageRenderer.d.ts +200 -0
  438. package/dist/utils/MessageRenderer.d.ts.map +1 -0
  439. package/dist/utils/MessageRenderer.js +283 -0
  440. package/dist/utils/MessageRenderer.js.map +1 -0
  441. package/dist/utils/ToolFormatter.d.ts +103 -0
  442. package/dist/utils/ToolFormatter.d.ts.map +1 -0
  443. package/dist/utils/ToolFormatter.js +357 -0
  444. package/dist/utils/ToolFormatter.js.map +1 -0
  445. package/dist/utils/boxDrawing.d.ts +23 -0
  446. package/dist/utils/boxDrawing.d.ts.map +1 -0
  447. package/dist/utils/boxDrawing.js +78 -0
  448. package/dist/utils/boxDrawing.js.map +1 -0
  449. package/dist/utils/checks.d.ts +9 -0
  450. package/dist/utils/checks.d.ts.map +1 -0
  451. package/dist/utils/checks.js +11 -0
  452. package/dist/utils/checks.js.map +1 -0
  453. package/dist/utils/events.d.ts +24 -0
  454. package/dist/utils/events.d.ts.map +1 -0
  455. package/dist/utils/events.js +17 -0
  456. package/dist/utils/events.js.map +1 -0
  457. package/dist/utils/formatters.d.ts +255 -0
  458. package/dist/utils/formatters.d.ts.map +1 -0
  459. package/dist/utils/formatters.js +361 -0
  460. package/dist/utils/formatters.js.map +1 -0
  461. package/dist/utils/math.d.ts +11 -0
  462. package/dist/utils/math.d.ts.map +1 -0
  463. package/dist/utils/math.js +13 -0
  464. package/dist/utils/math.js.map +1 -0
  465. package/package.json +82 -0
@@ -0,0 +1,307 @@
1
+ # Agent Profile Guide
2
+
3
+ This guide covers how to create, configure, and use Task Agent profiles in Nexus Cortex.
4
+
5
+ ## Overview
6
+
7
+ Task Agents are specialized sub-agents that can be spawned via the `Task` tool to handle complex, multi-step operations. Each agent is defined by a markdown file with YAML frontmatter configuration.
8
+
9
+ ## Directory Structure
10
+
11
+ Agents are loaded from two locations:
12
+
13
+ ```
14
+ .cortex/
15
+ └── agents/ # Project-specific agents
16
+ ├── explore.md
17
+ ├── code-reviewer.md
18
+ └── test-writer.md
19
+
20
+ ~/.cortex/agents/ # Personal agents (shared across projects)
21
+ └── my-custom-agent.md
22
+ ```
23
+
24
+ Project agents take precedence over personal agents with the same name.
25
+
26
+ ## Creating an Agent Profile
27
+
28
+ ### Basic Structure
29
+
30
+ ```markdown
31
+ ---
32
+ name: agent-name
33
+ description: Brief description of when to use this agent.
34
+ tools:
35
+ - Read
36
+ - Write
37
+ - Grep
38
+ model: sonnet
39
+ ---
40
+
41
+ # Agent Title
42
+
43
+ Your system prompt goes here. This defines the agent's personality,
44
+ capabilities, and behavior guidelines.
45
+ ```
46
+
47
+ ### Frontmatter Schema
48
+
49
+ | Field | Type | Required | Description |
50
+ |-------|------|----------|-------------|
51
+ | `name` | string | Yes | Unique identifier (alphanumeric + hyphens, max 64 chars) |
52
+ | `description` | string | Yes | When to use this agent (shown in tool description) |
53
+ | `tools` | string[] or "all" | Yes | Allowed tools or "all" for unrestricted access |
54
+ | `model` | string | Yes | Model alias or full ID, or "inherit" for parent's model |
55
+
56
+ ### Name Requirements
57
+
58
+ - Alphanumeric characters and hyphens only
59
+ - 1-64 characters
60
+ - Must be unique within the same location (project/personal)
61
+ - Case-sensitive
62
+
63
+ Valid: `code-reviewer`, `test123`, `my-agent`
64
+ Invalid: `Code Reviewer`, `test_writer`, `a-really-long-name-that-exceeds-the-maximum-allowed-length-of-64-characters`
65
+
66
+ ## Tool Configuration
67
+
68
+ ### Restricted Tool Access
69
+
70
+ Specify which tools the agent can use:
71
+
72
+ ```yaml
73
+ tools:
74
+ - Read # Read files
75
+ - Glob # Find files by pattern
76
+ - Grep # Search file contents
77
+ ```
78
+
79
+ The agent will only have access to these tools. Any attempt to use other tools will be blocked.
80
+
81
+ ### Full Tool Access
82
+
83
+ For agents that need all capabilities:
84
+
85
+ ```yaml
86
+ tools: all
87
+ ```
88
+
89
+ **Warning**: Use `all` sparingly. Restricted tools improve safety and focus.
90
+
91
+ ### Available Tools
92
+
93
+ Core file operations:
94
+ - `Read` - Read file contents
95
+ - `Write` - Create/overwrite files
96
+ - `Edit` - Edit existing files
97
+ - `Glob` - Find files by pattern
98
+ - `Grep` - Search file contents
99
+
100
+ Shell operations:
101
+ - `Bash` - Execute shell commands
102
+ - `BashOutput` - Get output from background shells
103
+ - `KillShell` - Terminate shells
104
+
105
+ Web operations:
106
+ - `WebSearch` - Search the web
107
+ - `WebFetch` - Fetch web pages
108
+
109
+ Planning and UI:
110
+ - `TodoWrite` - Manage task lists
111
+ - `AskUserQuestion` - Ask user questions
112
+ - `ExitPlanMode` - Exit plan mode
113
+
114
+ Special:
115
+ - `Task` - Spawn sub-agents (use carefully to avoid infinite loops)
116
+ - `SlashCommand` - Execute slash commands
117
+ - `Skill` - Use skills
118
+
119
+ ## Model Configuration
120
+
121
+ ### Model Aliases
122
+
123
+ Use convenient aliases for common models:
124
+
125
+ ```yaml
126
+ model: sonnet # Claude Sonnet 4.5
127
+ model: opus # Claude Opus 4.1
128
+ model: haiku # Claude 3.5 Haiku
129
+ model: gemini # Gemini 2.5 Pro
130
+ model: grok # Grok 4.1 Fast
131
+ model: deepseek # DeepSeek Chat
132
+ ```
133
+
134
+ ### Full Model IDs
135
+
136
+ Specify exact models:
137
+
138
+ ```yaml
139
+ model: claude-sonnet-4-5-20250929
140
+ model: gemini-2.5-flash
141
+ model: gpt-4o
142
+ ```
143
+
144
+ ### Inherit Parent Model
145
+
146
+ Use the same model as the parent session:
147
+
148
+ ```yaml
149
+ model: inherit
150
+ ```
151
+
152
+ ### Available Aliases
153
+
154
+ | Alias | Model |
155
+ |-------|-------|
156
+ | `sonnet`, `claude-sonnet`, `sonnet-4.5` | claude-sonnet-4-5-20250929 |
157
+ | `opus`, `claude-opus`, `opus-4` | claude-opus-4-1-20250805 |
158
+ | `haiku`, `claude-haiku`, `haiku-3.5` | claude-3-5-haiku-20241022 |
159
+ | `gemini`, `gemini-pro`, `gemini-2.5` | gemini-2.5-pro |
160
+ | `gemini-flash`, `flash` | gemini-2.5-flash |
161
+ | `grok`, `grok-4`, `grok-fast` | grok-4.1-fast-reasoning |
162
+ | `deepseek` | deepseek-v4-pro |
163
+ | `reasoner` | deepseek-v4-pro |
164
+ | `gpt4`, `gpt-4` | gpt-4.1 |
165
+ | `o1`, `o3`, `o4-mini` | (OpenAI reasoning models) |
166
+
167
+ ## System Prompt Best Practices
168
+
169
+ ### Structure
170
+
171
+ 1. **Role definition** - What the agent is and does
172
+ 2. **Approach/methodology** - How the agent works
173
+ 3. **Guidelines** - Rules and constraints
174
+ 4. **Output format** - Expected response structure
175
+
176
+ ### Example
177
+
178
+ ```markdown
179
+ ---
180
+ name: security-auditor
181
+ description: Performs security audits on code, identifying vulnerabilities and suggesting fixes.
182
+ tools:
183
+ - Read
184
+ - Glob
185
+ - Grep
186
+ model: opus
187
+ ---
188
+
189
+ # Security Auditor Agent
190
+
191
+ You are a security expert specializing in application security.
192
+
193
+ ## Your Role
194
+
195
+ Analyze code for security vulnerabilities including:
196
+ - Injection attacks (SQL, Command, XSS)
197
+ - Authentication/authorization flaws
198
+ - Data exposure risks
199
+ - Cryptographic weaknesses
200
+
201
+ ## Approach
202
+
203
+ 1. Read relevant files systematically
204
+ 2. Check for known vulnerability patterns
205
+ 3. Assess severity (Critical/High/Medium/Low)
206
+ 4. Provide remediation guidance
207
+
208
+ ## Output Format
209
+
210
+ Report each finding as:
211
+
212
+ ### [Severity] [Vulnerability Type]
213
+ **Location**: file:line
214
+ **Description**: What the issue is
215
+ **Impact**: What could happen
216
+ **Remediation**: How to fix it
217
+ ```
218
+
219
+ ### Tips
220
+
221
+ - **Be specific** - Clear instructions produce better results
222
+ - **Include examples** - Show expected output format
223
+ - **Define scope** - What should and shouldn't be done
224
+ - **Set constraints** - Quality standards, safety rules
225
+
226
+ ## Using Agents
227
+
228
+ ### Via Task Tool
229
+
230
+ The Task tool spawns agents:
231
+
232
+ ```
233
+ Use the Task tool to spawn the code-reviewer agent with:
234
+ - task: "Review the authentication module for security issues"
235
+ - agent: "code-reviewer"
236
+ ```
237
+
238
+ ### Agent Selection
239
+
240
+ The parent LLM selects agents based on the task and agent descriptions. Write clear descriptions to improve selection accuracy.
241
+
242
+ ### Monitoring
243
+
244
+ Sub-agent events are streamed to the parent:
245
+ - `agent:started` - Agent begins execution
246
+ - `agent:progress` - Progress updates (tokens, turns)
247
+ - `agent:tool_call` - Tool usage
248
+ - `agent:text` - Output text
249
+ - `agent:completed` - Execution complete
250
+ - `agent:error` - Errors encountered
251
+
252
+ ## Advanced Configuration
253
+
254
+ ### Timeout Settings
255
+
256
+ Configure via Task tool options (not in agent definition):
257
+
258
+ ```
259
+ timeout: 300000 # 5 minutes (default)
260
+ maxTurns: 10 # Maximum conversation turns
261
+ ```
262
+
263
+ ### Permission Inheritance
264
+
265
+ Agents inherit permission policies from the parent session:
266
+ - Parent's whitelist/blacklist policies apply
267
+ - File operation restrictions are enforced
268
+ - Bash command policies carry over
269
+
270
+ Agents cannot exceed parent permissions, only further restrict them.
271
+
272
+ ## Troubleshooting
273
+
274
+ ### Agent Not Found
275
+
276
+ Check:
277
+ 1. File is in `.cortex/agents/` or `~/.cortex/agents/`
278
+ 2. File has `.md` extension
279
+ 3. YAML frontmatter is valid
280
+ 4. Name matches file name (recommended)
281
+
282
+ ### Invalid Configuration
283
+
284
+ Common issues:
285
+ - Missing required field (`name`, `description`, `tools`, `model`)
286
+ - Invalid tool name (check spelling, case-sensitive)
287
+ - Invalid model alias (check available aliases)
288
+ - Invalid name format (special characters)
289
+
290
+ ### Agent Errors
291
+
292
+ Check the agent:error event for details. Common causes:
293
+ - Tool restrictions blocking required operations
294
+ - Model API errors
295
+ - Timeout exceeded
296
+ - Invalid system prompt
297
+
298
+ ## Example Agents
299
+
300
+ See the other files in this directory for complete examples:
301
+
302
+ - `explore.md` - Fast codebase exploration
303
+ - `code-reviewer.md` - Code review
304
+ - `test-writer.md` - Test generation
305
+ - `doc-writer.md` - Documentation
306
+ - `refactor.md` - Code refactoring
307
+ - `plan.md` - Implementation planning
@@ -0,0 +1,268 @@
1
+ # Agent Dispatch Modes — Nexus Cortex
2
+
3
+ This directory contains Task Agent profiles. The orchestrator spawns agents via `child_process.fork()` when the LLM calls the `Task` tool. Agents run as independent processes with their own orchestrator instance, tools, and session.
4
+
5
+ ## Quick Reference
6
+
7
+ | Mode | Agents | Communication | Workspace | Trigger |
8
+ |------|--------|--------------|-----------|---------|
9
+ | **Solo** | 1 | None | Shared | 1 Task tool call |
10
+ | **Parallel** | N | None | Shared | N Task tool calls in same turn |
11
+ | **Team** | N | Briefing + Broadcasting | Shared | N Task calls (auto-detected) |
12
+ | **Git Worktree** | N | Briefing + Broadcasting | Isolated per agent | WorkspaceManager + N Task calls |
13
+
14
+ ---
15
+
16
+ ## Mode 1: Solo Agent
17
+
18
+ A single Task tool call spawns one agent. The agent runs independently, completes its work, and returns results to the orchestrator.
19
+
20
+ ### When to Use
21
+ - Focused single-domain tasks (code review, exploration, test writing)
22
+ - Tasks that don't benefit from parallelization
23
+
24
+ ### Usage
25
+
26
+ ```bash
27
+ # Via cortex CLI — model dispatches a solo agent internally
28
+ cortex --quiet "Review packages/core/src/orchestrator/APIClient.ts for security issues"
29
+
30
+ # Via API
31
+ curl -s http://localhost:4000/v1/messages \
32
+ -H "Content-Type: application/json" \
33
+ -d '{"messages":[{"role":"user","content":"Use the code-reviewer agent to review APIClient.ts"}]}'
34
+ ```
35
+
36
+ ### How It Works
37
+ 1. LLM calls Task tool with agent name and prompt
38
+ 2. Orchestrator spawns child process via `SubAgentProcessManager.spawnAgent()`
39
+ 3. Agent runs with its own tools, model, and system prompt (from `.cortex/agents/{name}.md`)
40
+ 4. IPC events stream back: tool calls, text, progress, completion
41
+ 5. Agent result returned as tool_result to parent LLM
42
+
43
+ ---
44
+
45
+ ## Mode 2: Parallel Agents
46
+
47
+ Multiple Task tool calls in the same LLM response are dispatched simultaneously via `Promise.all`. Agents run independently with no communication between them.
48
+
49
+ ### When to Use
50
+ - Independent tasks that can run concurrently
51
+ - Multiple searches or analyses that don't need to share findings
52
+ - Speed-critical workflows where wall-clock time matters
53
+
54
+ ### Usage
55
+
56
+ ```bash
57
+ # The model decides to parallelize based on the prompt
58
+ cortex --quiet "Search for all usages of deprecated API patterns AND check test coverage for the auth module"
59
+
60
+ # Explicit multi-agent dispatch
61
+ cortex --quiet "Use 3 parallel explore agents to search for: (1) all WebSocket code, (2) all authentication middleware, (3) all rate limiting logic"
62
+ ```
63
+
64
+ ### How It Works
65
+ 1. LLM emits N Task tool calls in a single response
66
+ 2. `handleToolCalls()` in orchestrator separates Task tools from regular tools
67
+ 3. All N agents spawned simultaneously via `Promise.all`
68
+ 4. Each agent runs independently — no shared state or communication
69
+ 5. All results collected and returned to parent LLM
70
+
71
+ ---
72
+
73
+ ## Mode 3: Team Agents
74
+
75
+ When the orchestrator detects >1 Task tools in the same response, it automatically activates team mode. Each agent receives a **team briefing** prepended to its prompt, and when any agent completes, its findings are **broadcast** to still-running siblings.
76
+
77
+ ### When to Use
78
+ - Tasks where agents benefit from knowing about each other's work
79
+ - PR review (security + quality + architecture agents share findings)
80
+ - Any parallel dispatch where cross-pollination of results adds value
81
+
82
+ ### Usage
83
+
84
+ ```bash
85
+ # PR review — dispatches 3 audit agents as a team
86
+ cortex --pr review owner/repo 42
87
+
88
+ # Custom team dispatch
89
+ cortex --quiet "Dispatch a team of 3 agents: one to review security, one to review performance, one to check test coverage for the auth refactor"
90
+
91
+ # Via API
92
+ curl -s http://localhost:4000/v1/messages \
93
+ -H "Content-Type: application/json" \
94
+ -d '{"messages":[{"role":"user","content":"Use parallel agents to review the auth module. Dispatch pr-security-auditor, pr-code-quality, and pr-architecture-reviewer as a team."}]}'
95
+ ```
96
+
97
+ ### How It Works
98
+ 1. LLM emits N Task tool calls in a single response
99
+ 2. `handleToolCalls()` detects N > 1, calls `injectTeamBriefing()`
100
+ 3. Each agent's prompt gets prepended with:
101
+ ```
102
+ 📋 **Team Briefing**
103
+ You are part of a {N}-agent team working in parallel.
104
+
105
+ Teammates:
106
+ - {agent-1}: {assignment}
107
+ - {agent-2}: {assignment}
108
+
109
+ The orchestrator will forward relevant findings from teammates.
110
+ Focus on YOUR assignment. Do not duplicate others' work.
111
+ ```
112
+ 4. Agents run in parallel
113
+ 5. When Agent A completes, `broadcastGuidance()` sends summary to Agents B, C
114
+ 6. Running agents receive guidance via IPC → `injectGuidance()` → ephemeral `<system-reminder>` or thinking block
115
+ 7. All results collected and returned to parent LLM
116
+
117
+ ### Cross-Agent Communication Path
118
+ ```
119
+ Agent A completes
120
+ → SubAgentProcessManager.broadcastGuidance(summary, excludeAgentA)
121
+ → IPC message type 'guidance' sent to Agent B, C
122
+ → agent-mode.ts handler pushes to pendingGuidance[]
123
+ → orchestrator.injectGuidance(message, 'team_update')
124
+ → injectThinkingBlock() dual-path:
125
+ Google: thinking block
126
+ Others: <system-reminder> tag
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Mode 4: Git Worktree (Isolated Workspace)
132
+
133
+ Combines team mode with per-agent git worktree isolation. Each agent works in its own branch and directory, preventing file conflicts. The `WorkspaceManager` tool manages the worktree lifecycle.
134
+
135
+ ### When to Use
136
+ - Multiple agents editing the same codebase simultaneously
137
+ - PR implementation with parallel feature branches
138
+ - Multi-repo operations (clone external repos for each agent)
139
+ - Any scenario where agents might create conflicting file changes
140
+
141
+ ### Usage
142
+
143
+ ```bash
144
+ # Internal development — multiple agents on different features
145
+ cortex --quiet "Use WorkspaceManager to create 2 worktrees (branch auth-refactor and branch api-cleanup), then dispatch pr-implementer agents to each worktree with specific tasks"
146
+
147
+ # External PR — clone and review
148
+ cortex --pr review external-org/repo 42
149
+
150
+ # Multi-repo workflow
151
+ cortex --quiet "Clone owner/upstream-lib into a worktree AND create a local worktree for this repo's changes. Dispatch agents to update shared types in both."
152
+ ```
153
+
154
+ ### How It Works
155
+ 1. LLM calls `WorkspaceManager` tool to create worktrees:
156
+ - `create` mode: `git worktree add /tmp/workspace-{id} -b {branch}`
157
+ - `clone` mode: `git clone {repo} /tmp/repo-{id}` then worktree
158
+ 2. WorkspaceManager returns structured JSON with worktree paths
159
+ 3. LLM includes worktree paths in Task prompts for each agent
160
+ 4. Team briefing includes workspace paths for each teammate
161
+ 5. Each agent operates in its isolated worktree
162
+ 6. After agents complete, LLM can:
163
+ - `diff` mode: See what each agent changed
164
+ - `cleanup` mode: Remove worktrees
165
+
166
+ ### WorkspaceManager Modes
167
+
168
+ | Mode | Command | Returns |
169
+ |------|---------|---------|
170
+ | `create` | `git worktree add /tmp/workspace-{id} -b {branch}` | worktree path |
171
+ | `clone` | `git clone {repo}` + `git worktree add` | worktree path |
172
+ | `status` | `git worktree list` | all active worktrees |
173
+ | `diff` | `git -C {path} diff {base}` | diff content |
174
+ | `cleanup` | `git worktree remove {path}` | confirmation |
175
+
176
+ ---
177
+
178
+ ## Visual Monitoring (Optional)
179
+
180
+ Set `AGENT_TMUX_MONITOR=true` to enable tmux pane monitoring for parallel agents.
181
+
182
+ ```bash
183
+ # Enable monitoring
184
+ AGENT_TMUX_MONITOR=true cortex --quiet "Dispatch 3 parallel agents..."
185
+
186
+ # View in browser
187
+ open http://localhost:4001/tmux/team-{dispatchId}
188
+
189
+ # Attach in terminal
190
+ tmux attach -t team-{dispatchId}
191
+ ```
192
+
193
+ Each agent gets its own tmux pane showing live IPC events:
194
+ - `🔧 Read /path/to/file` — tool calls
195
+ - Agent text output
196
+ - `Turn 3 | 5.2K tokens | 12.3s` — progress
197
+ - `✅ Done: {summary}` — completion
198
+ - `❌ Error: {message}` — errors
199
+
200
+ ---
201
+
202
+ ## Agent Profiles in This Directory
203
+
204
+ ### General Purpose
205
+ | Agent | Model | Tools | Use Case |
206
+ |-------|-------|-------|----------|
207
+ | `explore` | inherit | Read, Glob, Grep | Fast codebase exploration |
208
+ | `code-reviewer` | inherit | Read, Grep, Glob | Code review with findings |
209
+ | `test-writer` | inherit | Read, Write, Edit, Bash, Grep, Glob | Test generation |
210
+ | `doc-writer` | inherit | Read, Write, Edit, Glob, Grep | Documentation |
211
+ | `refactor` | inherit | Read, Write, Edit, Bash, Grep, Glob | Code refactoring |
212
+ | `plan` | inherit | Read, Glob, Grep | Implementation planning |
213
+ | `context-research` | inherit | Read, Grep, Glob, WebSearch, WebFetch | Research with web access |
214
+
215
+ ### PR Review Team
216
+ | Agent | Model | Tools | Role in Team |
217
+ |-------|-------|-------|-------------|
218
+ | `pr-security-auditor` | inherit | Grep, Read, Bash | Scan for vulnerabilities, malicious code, supply chain risks |
219
+ | `pr-code-quality` | inherit | Read, Grep, Glob | Review style, complexity, anti-patterns, test gaps |
220
+ | `pr-architecture-reviewer` | inherit | Read, Grep, Glob, Bash | Breaking changes, API surface, dependency impact |
221
+ | `pr-implementer` | inherit | Read, Edit, Write, Bash, Grep, Glob | Implement code changes in git worktree |
222
+ | `pr-test-writer` | inherit | Read, Write, Edit, Bash, Grep, Glob | Write tests for PR changes |
223
+
224
+ ### Specialized
225
+ | Agent | Model | Tools | Use Case |
226
+ |-------|-------|-------|----------|
227
+ | `new-model-api-integrator-analyst` | inherit | all | Analyze new AI provider APIs for integration |
228
+ | `a-frontend-landing-page-designer` | inherit | all | Design frontend interfaces |
229
+
230
+ ---
231
+
232
+ ## Creating a New Agent
233
+
234
+ See `AGENT_PROFILE_GUIDE.md` for the full guide. Quick version:
235
+
236
+ ```markdown
237
+ ---
238
+ name: my-agent
239
+ description: Brief description of when to use this agent.
240
+ tools:
241
+ - Read
242
+ - Write
243
+ - Grep
244
+ model: inherit
245
+ ---
246
+
247
+ # My Agent
248
+
249
+ System prompt defining the agent's role, approach, and output format.
250
+ ```
251
+
252
+ **Required fields**: `name`, `description`, `tools`, `model`
253
+ **Model options**: `inherit` (parent's model), aliases (`sonnet`, `opus`, `haiku`, `grok`), or full IDs
254
+ **Tools**: Array of tool names or `all` for unrestricted access
255
+
256
+ ---
257
+
258
+ ## Troubleshooting
259
+
260
+ | Issue | Fix |
261
+ |-------|-----|
262
+ | Agent not found | Check `.cortex/agents/{name}.md` exists with valid YAML frontmatter |
263
+ | Team briefing not appearing | Ensure >1 Task tools in same LLM response |
264
+ | WorkspaceManager branch conflict | `git branch -D {branch}` to clean stale branches |
265
+ | Guidance not received | Check agent-mode.ts guidance handler, verify IPC is connected |
266
+ | Tmux monitoring not working | Verify `tmux` binary available, `AGENT_TMUX_MONITOR=true` |
267
+ | PR commands failing | Verify `gh auth status` — gh CLI must be authenticated |
268
+ | Model not found errors | Use registered model IDs (check `cortex --list-models`) |
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: landing-page-designer
3
+ description: A frontend landing page designer for rich beautiful landing pages
4
+ tools:
5
+ - read
6
+ - write
7
+ - edit
8
+ - glob
9
+ - grep
10
+ - bash
11
+ - web_fetch
12
+ model: gpt-5-mini
13
+ ---
14
+
15
+ # a-frontend-landing-page-designer
16
+
17
+ ## Your Role
18
+
19
+ You are a specialized A frontend landing page designer for rich beautiful landing pages agent.
20
+
21
+ ## Context from User
22
+
23
+ A frontend landing page designer for rich beautiful landing pages HTML/CSS,. js, and tailwind it should focus on easily extendable frameworks
24
+
25
+ ## Responsibilities
26
+
27
+ - Understand and fulfill requests related to A frontend landing page designer for rich beautiful landing pages
28
+ - Use available tools effectively to accomplish tasks
29
+ - Provide clear explanations of your actions
30
+ - Ask for clarification when requirements are ambiguous
31
+
32
+ ## Guidelines
33
+
34
+ - Be thorough and methodical in your approach
35
+ - Focus on quality and correctness
36
+ - Explain your reasoning when making decisions
37
+ - Follow best practices for the domain
38
+
39
+ ## Output Format
40
+
41
+ Provide clear, well-structured output appropriate to the task.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: autoresearch-agent
3
+ description: Runs one auto-research experiment cycle on a single backlog deficiency — fix in an isolated worktree, measure base-vs-candidate through the statistical gate, and report a verified candidate. One of N the PM spawns per deficiency.
4
+ tools:
5
+ - read
6
+ - write
7
+ - edit
8
+ - glob
9
+ - grep
10
+ - bash
11
+ - research_backlog
12
+ - workspace_manager
13
+ model: deepseek-v4-flash
14
+ ---
15
+
16
+ # Auto-Research Agent
17
+
18
+ You are ONE of several auto-research agents the PM spawned on the **same** backlog deficiency. Your job: produce one candidate improvement and measure whether it is a REAL, verified improvement — then report. You do **not** merge anything yourself; the PM arbitrates across all agents and merges the verified winner.
19
+
20
+ ## Read your task first
21
+ Your prompt contains:
22
+ - The **deficiency** (what to improve) and how it's measured (task-set / metric).
23
+ - An **EXECUTION MODE**: `native` or `mcp`.
24
+ - Your **strategy flavor** (e.g. conservative vs aggressive fix, a specific hypothesis). You are one of N varied arms — stay in your lane so the arms stay diverse.
25
+
26
+ ## Operating rules — read before you start
27
+ - **If it is NOT measurable, FAIL FAST.** If the deficiency has no eval / repro / task-set you can run a base-vs-candidate measurement against, do NOT explore the codebase indefinitely. Within a few turns, set the deficiency `wont_fix` with the note "not measurable — needs a benchmark task-set/eval" and STOP. A long fruitless search is worse than an honest early bail.
28
+ - **Turn budget.** Reach a runnable experiment within ~15 turns. If you cannot, stop and report what is blocking (no metric, no repro, can't locate the code) — do not burn the whole budget searching.
29
+ - **Follow YOUR assigned strategy.** Pursue the persona/strategy in your prompt; do NOT converge on the same path as the other arms. If every arm does the same thing, the parallelism is wasted.
30
+ - **Always update the backlog before finishing** — `fixed`, `verified`, or `wont_fix` with a note. Never leave the deficiency `in_progress` and walk away.
31
+
32
+ ## EXECUTION MODE: native (use the internal tools)
33
+ 1. **`ResearchBacklog`** → `next` / confirm the deficiency; `in_progress` to claim it (use the experiment tag from your prompt).
34
+ 2. **`WorkspaceManager`** → create an isolated **candidate worktree** off the base ref. NEVER edit the user's working tree.
35
+ 3. **Apply your fix** in the worktree. Either run the headless Fixer — `cortex autoresearch fix --cwd <worktree> --prompt "<deficiency + your strategy>"` via Bash — or edit directly with Read/Edit/Write. Then commit it (`git -C <worktree> add -A && git -C <worktree> commit -m "..."`).
36
+ 4. **Measure**: `cortex autoresearch experiment --experiment-tag <tag> --base-dir <base> --candidate-dir <worktree> --task-set <tasks> [--holdout-set <holdout>] --json` via Bash. (Add `--run-cmd '<eval>'` for a non-cortex target.)
37
+ 5. **Read the JSON verdict**: `decision` (keep/discard), `effect`, `mergeEligible` (keep + FWER + holdout-verified).
38
+ 6. **`ResearchBacklog`** → `fixed` (passed the discovery task) or — only after a holdout confirms — `verified`. Never `verified` on train alone.
39
+
40
+ ## EXECUTION MODE: mcp (offload to the hosted harness)
41
+ Use the configured **auto-research MCP** tools instead of the internal CLI: submit the experiment, poll its status, read the verdict. Do **not** run the local `cortex autoresearch` CLI in this mode — the MCP server runs it for you in its container.
42
+
43
+ ## Discipline (do not break these)
44
+ - **fixed ≠ verified.** A candidate that only passes the task that surfaced the deficiency is `fixed`, NOT verified. Only a HELD-OUT confirmation makes it `verified`.
45
+ - **Do not self-merge.** Report your candidate ref + its verdict; the PM applies the cross-arm gate and merges the single winner. With N parallel arms, some clear the bar by chance — central arbitration is what keeps that honest.
46
+ - **Stay isolated.** All work in your own worktree off the base ref; never touch the user's branch or working tree.
47
+
48
+ ## Report back
49
+ Return: your candidate ref, the verdict JSON (`decision` / `effect` / `mergeEligible`), what you changed, and whether it is holdout-verified. Keep it tight — the PM is comparing N of these.