atabey 0.0.6 → 0.0.8

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 (407) hide show
  1. package/ATABEY.md +4 -4
  2. package/README.md +35 -33
  3. package/bin/cli.js +2 -2
  4. package/bin/validate-agent-army.js +6 -6
  5. package/dist/framework-mcp/src/constants.js +1 -1
  6. package/dist/framework-mcp/src/constants.js.map +1 -1
  7. package/dist/framework-mcp/src/index.js +29 -5
  8. package/dist/framework-mcp/src/index.js.map +1 -1
  9. package/dist/framework-mcp/src/resources/index.d.ts +10 -0
  10. package/dist/framework-mcp/src/resources/index.js +59 -0
  11. package/dist/framework-mcp/src/resources/index.js.map +1 -0
  12. package/dist/framework-mcp/src/tools/control_plane/locking.js +3 -3
  13. package/dist/framework-mcp/src/tools/control_plane/locking.js.map +1 -1
  14. package/dist/framework-mcp/src/tools/control_plane/registry.js +3 -2
  15. package/dist/framework-mcp/src/tools/control_plane/registry.js.map +1 -1
  16. package/dist/framework-mcp/src/tools/definitions.js +33 -1
  17. package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
  18. package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.d.ts +1 -1
  19. package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js +8 -3
  20. package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js.map +1 -1
  21. package/dist/framework-mcp/src/tools/file_system/patch_file.d.ts +1 -1
  22. package/dist/framework-mcp/src/tools/file_system/patch_file.js +8 -3
  23. package/dist/framework-mcp/src/tools/file_system/patch_file.js.map +1 -1
  24. package/dist/framework-mcp/src/tools/file_system/read_file.js +3 -3
  25. package/dist/framework-mcp/src/tools/file_system/read_file.js.map +1 -1
  26. package/dist/framework-mcp/src/tools/file_system/replace_text.d.ts +1 -1
  27. package/dist/framework-mcp/src/tools/file_system/replace_text.js +8 -3
  28. package/dist/framework-mcp/src/tools/file_system/replace_text.js.map +1 -1
  29. package/dist/framework-mcp/src/tools/file_system/write_file.d.ts +1 -1
  30. package/dist/framework-mcp/src/tools/file_system/write_file.js +10 -5
  31. package/dist/framework-mcp/src/tools/file_system/write_file.js.map +1 -1
  32. package/dist/framework-mcp/src/tools/framework/audit_deps.js +2 -2
  33. package/dist/framework-mcp/src/tools/framework/audit_deps.js.map +1 -1
  34. package/dist/framework-mcp/src/tools/framework/run_tests.js +2 -2
  35. package/dist/framework-mcp/src/tools/framework/run_tests.js.map +1 -1
  36. package/dist/framework-mcp/src/tools/framework/submit_plan.d.ts +10 -0
  37. package/dist/framework-mcp/src/tools/framework/submit_plan.js +14 -0
  38. package/dist/framework-mcp/src/tools/framework/submit_plan.js.map +1 -0
  39. package/dist/framework-mcp/src/tools/framework/update_memory.js +1 -1
  40. package/dist/framework-mcp/src/tools/framework/update_memory.js.map +1 -1
  41. package/dist/framework-mcp/src/tools/index.js +2 -0
  42. package/dist/framework-mcp/src/tools/index.js.map +1 -1
  43. package/dist/framework-mcp/src/tools/memory/get_insights.js +1 -1
  44. package/dist/framework-mcp/src/tools/memory/get_insights.js.map +1 -1
  45. package/dist/framework-mcp/src/tools/messaging/log_action.js +1 -1
  46. package/dist/framework-mcp/src/tools/messaging/log_action.js.map +1 -1
  47. package/dist/framework-mcp/src/tools/messaging/send_message.js +5 -5
  48. package/dist/framework-mcp/src/tools/messaging/send_message.js.map +1 -1
  49. package/dist/framework-mcp/src/tools/observability/check_ports.js +1 -1
  50. package/dist/framework-mcp/src/tools/observability/check_ports.js.map +1 -1
  51. package/dist/framework-mcp/src/tools/quality/check_lint.js +2 -2
  52. package/dist/framework-mcp/src/tools/quality/check_lint.js.map +1 -1
  53. package/dist/framework-mcp/src/tools/search/get_gaps.js +1 -1
  54. package/dist/framework-mcp/src/tools/search/get_gaps.js.map +1 -1
  55. package/dist/framework-mcp/src/tools/search/grep_search.js +3 -3
  56. package/dist/framework-mcp/src/tools/search/grep_search.js.map +1 -1
  57. package/dist/framework-mcp/src/tools/types.d.ts +1 -0
  58. package/dist/framework-mcp/src/utils/compliance.d.ts +6 -0
  59. package/dist/framework-mcp/src/utils/compliance.js +158 -5
  60. package/dist/framework-mcp/src/utils/compliance.js.map +1 -1
  61. package/dist/framework-mcp/src/utils/permissions.d.ts +12 -0
  62. package/dist/framework-mcp/src/utils/permissions.js +72 -0
  63. package/dist/framework-mcp/src/utils/permissions.js.map +1 -0
  64. package/dist/framework-mcp/tests/tools/file_system/compliance-risk.test.d.ts +1 -0
  65. package/dist/framework-mcp/tests/tools/file_system/compliance-risk.test.js +84 -0
  66. package/dist/framework-mcp/tests/tools/file_system/compliance-risk.test.js.map +1 -0
  67. package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js +31 -31
  68. package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js.map +1 -1
  69. package/dist/framework-mcp/tests/tools/file_system/permissions.test.d.ts +1 -0
  70. package/dist/framework-mcp/tests/tools/file_system/permissions.test.js +92 -0
  71. package/dist/framework-mcp/tests/tools/file_system/permissions.test.js.map +1 -0
  72. package/dist/framework-mcp/tests/tools/messaging/send_message.test.js +5 -5
  73. package/dist/framework-mcp/tests/tools/messaging/send_message.test.js.map +1 -1
  74. package/dist/src/cli/adapters/core.js +13 -20
  75. package/dist/src/cli/adapters/core.js.map +1 -1
  76. package/dist/src/cli/adapters/scaffold.js +2 -2
  77. package/dist/src/cli/adapters/scaffold.js.map +1 -1
  78. package/dist/src/cli/commands/check.js +5 -3
  79. package/dist/src/cli/commands/check.js.map +1 -1
  80. package/dist/src/cli/commands/compliance.js +2 -2
  81. package/dist/src/cli/commands/compliance.js.map +1 -1
  82. package/dist/src/cli/commands/contract.js +2 -2
  83. package/dist/src/cli/commands/contract.js.map +1 -1
  84. package/dist/src/cli/commands/dashboard.d.ts +5 -0
  85. package/dist/src/cli/commands/dashboard.js +124 -0
  86. package/dist/src/cli/commands/dashboard.js.map +1 -0
  87. package/dist/src/cli/commands/explorer.js +3 -3
  88. package/dist/src/cli/commands/explorer.js.map +1 -1
  89. package/dist/src/cli/commands/git.js +3 -3
  90. package/dist/src/cli/commands/git.js.map +1 -1
  91. package/dist/src/cli/commands/init/create-agent.d.ts +4 -0
  92. package/dist/src/cli/commands/init/create-agent.js +59 -0
  93. package/dist/src/cli/commands/init/create-agent.js.map +1 -0
  94. package/dist/src/cli/commands/init/scaffold-core.d.ts +1 -0
  95. package/dist/src/cli/commands/init/scaffold-core.js +11 -7
  96. package/dist/src/cli/commands/init/scaffold-core.js.map +1 -1
  97. package/dist/src/cli/commands/init/scaffold-docs.d.ts +1 -0
  98. package/dist/src/cli/commands/init/scaffold-docs.js +4 -6
  99. package/dist/src/cli/commands/init/scaffold-docs.js.map +1 -1
  100. package/dist/src/cli/commands/init/scaffold-ops.js +4 -4
  101. package/dist/src/cli/commands/init/scaffold-ops.js.map +1 -1
  102. package/dist/src/cli/commands/init/scaffold-standards.js +10 -8
  103. package/dist/src/cli/commands/init/scaffold-standards.js.map +1 -1
  104. package/dist/src/cli/commands/init.js +26 -10
  105. package/dist/src/cli/commands/init.js.map +1 -1
  106. package/dist/src/cli/commands/knowledge.js +3 -3
  107. package/dist/src/cli/commands/knowledge.js.map +1 -1
  108. package/dist/src/cli/commands/lint.js +2 -2
  109. package/dist/src/cli/commands/lint.js.map +1 -1
  110. package/dist/src/cli/commands/log.js +6 -28
  111. package/dist/src/cli/commands/log.js.map +1 -1
  112. package/dist/src/cli/commands/orchestrate.d.ts +10 -17
  113. package/dist/src/cli/commands/orchestrate.js +92 -341
  114. package/dist/src/cli/commands/orchestrate.js.map +1 -1
  115. package/dist/src/cli/commands/plan.d.ts +5 -0
  116. package/dist/src/cli/commands/plan.js +80 -59
  117. package/dist/src/cli/commands/plan.js.map +1 -1
  118. package/dist/src/cli/commands/script.js +3 -3
  119. package/dist/src/cli/commands/script.js.map +1 -1
  120. package/dist/src/cli/commands/security.js +2 -2
  121. package/dist/src/cli/commands/security.js.map +1 -1
  122. package/dist/src/cli/commands/status.js +65 -8
  123. package/dist/src/cli/commands/status.js.map +1 -1
  124. package/dist/src/cli/commands/trace.d.ts +4 -0
  125. package/dist/src/cli/commands/trace.js +83 -2
  126. package/dist/src/cli/commands/trace.js.map +1 -1
  127. package/dist/src/cli/index.js +68 -18
  128. package/dist/src/cli/index.js.map +1 -1
  129. package/dist/src/cli/shims.js +14 -14
  130. package/dist/src/cli/utils/claude.js +1 -1
  131. package/dist/src/cli/utils/claude.js.map +1 -1
  132. package/dist/src/cli/utils/compliance.js +7 -1
  133. package/dist/src/cli/utils/compliance.js.map +1 -1
  134. package/dist/src/cli/utils/fs.js +1 -1
  135. package/dist/src/cli/utils/fs.js.map +1 -1
  136. package/dist/src/cli/utils/i18n.d.ts +1 -0
  137. package/dist/src/cli/utils/i18n.js +2 -0
  138. package/dist/src/cli/utils/i18n.js.map +1 -1
  139. package/dist/src/cli/utils/memory.d.ts +12 -3
  140. package/dist/src/cli/utils/memory.js +39 -31
  141. package/dist/src/cli/utils/memory.js.map +1 -1
  142. package/dist/src/cli/utils/pkg.js +2 -2
  143. package/dist/src/cli/utils/pkg.js.map +1 -1
  144. package/dist/src/cli/utils/schemas.d.ts +8 -8
  145. package/dist/src/cli/utils/ui.js +4 -4
  146. package/dist/src/cli/utils/ui.js.map +1 -1
  147. package/dist/src/contracts/tasks.d.ts +2 -2
  148. package/dist/src/dashboard/vite.config.d.ts +2 -0
  149. package/dist/src/dashboard/vite.config.js +16 -0
  150. package/dist/src/dashboard/vite.config.js.map +1 -0
  151. package/dist/src/modules/adapters/definitions.js +10 -10
  152. package/dist/src/modules/adapters/definitions.js.map +1 -1
  153. package/dist/src/modules/adapters/shared.js +4 -4
  154. package/dist/src/modules/adapters/shared.js.map +1 -1
  155. package/dist/src/modules/agents/definitions.d.ts +19 -0
  156. package/dist/src/modules/agents/definitions.js +74 -21
  157. package/dist/src/modules/agents/definitions.js.map +1 -1
  158. package/dist/src/modules/agents/registry/backend.js +8 -0
  159. package/dist/src/modules/agents/registry/backend.js.map +1 -1
  160. package/dist/src/modules/agents/registry/database.js +7 -0
  161. package/dist/src/modules/agents/registry/database.js.map +1 -1
  162. package/dist/src/modules/agents/registry/devops.js +6 -0
  163. package/dist/src/modules/agents/registry/devops.js.map +1 -1
  164. package/dist/src/modules/agents/registry/frontend.js +8 -0
  165. package/dist/src/modules/agents/registry/frontend.js.map +1 -1
  166. package/dist/src/modules/agents/registry/security.js +6 -0
  167. package/dist/src/modules/agents/registry/security.js.map +1 -1
  168. package/dist/src/modules/agents/types.d.ts +2 -0
  169. package/dist/src/modules/engines/evaluation-engine.d.ts +11 -0
  170. package/dist/src/modules/engines/evaluation-engine.js +103 -0
  171. package/dist/src/modules/engines/evaluation-engine.js.map +1 -0
  172. package/dist/src/modules/engines/health-engine.d.ts +16 -0
  173. package/dist/src/modules/engines/health-engine.js +50 -0
  174. package/dist/src/modules/engines/health-engine.js.map +1 -0
  175. package/dist/src/modules/engines/planning-engine.d.ts +25 -0
  176. package/dist/src/modules/engines/planning-engine.js +79 -0
  177. package/dist/src/modules/engines/planning-engine.js.map +1 -0
  178. package/dist/src/modules/engines/risk-engine.d.ts +18 -0
  179. package/dist/src/modules/engines/risk-engine.js +106 -0
  180. package/dist/src/modules/engines/risk-engine.js.map +1 -0
  181. package/dist/src/modules/engines/routing-engine.d.ts +11 -0
  182. package/dist/src/modules/engines/routing-engine.js +74 -0
  183. package/dist/src/modules/engines/routing-engine.js.map +1 -0
  184. package/dist/src/modules/engines/types.d.ts +47 -0
  185. package/dist/src/modules/engines/types.js +2 -0
  186. package/dist/src/modules/engines/types.js.map +1 -0
  187. package/dist/src/shared/constants.d.ts +6 -2
  188. package/dist/src/shared/constants.js +5 -1
  189. package/dist/src/shared/constants.js.map +1 -1
  190. package/dist/src/shared/fs.d.ts +1 -0
  191. package/dist/src/shared/fs.js +4 -0
  192. package/dist/src/shared/fs.js.map +1 -1
  193. package/dist/src/shared/storage.d.ts +60 -0
  194. package/dist/src/shared/storage.js +208 -0
  195. package/dist/src/shared/storage.js.map +1 -0
  196. package/dist/tests/adapter.test.js +3 -2
  197. package/dist/tests/adapter.test.js.map +1 -1
  198. package/dist/tests/agent-memory-v2.test.d.ts +1 -0
  199. package/dist/tests/agent-memory-v2.test.js +68 -0
  200. package/dist/tests/agent-memory-v2.test.js.map +1 -0
  201. package/dist/tests/agents-definitions.test.js +42 -0
  202. package/dist/tests/agents-definitions.test.js.map +1 -1
  203. package/dist/tests/integration/hermes_locking.test.js +7 -10
  204. package/dist/tests/integration/hermes_locking.test.js.map +1 -1
  205. package/dist/tests/orchestrate.test.js +5 -1
  206. package/dist/tests/orchestrate.test.js.map +1 -1
  207. package/dist/tests/orchestrator-dependencies.test.d.ts +1 -0
  208. package/dist/tests/orchestrator-dependencies.test.js +52 -0
  209. package/dist/tests/orchestrator-dependencies.test.js.map +1 -0
  210. package/dist/tests/plan.test.d.ts +1 -0
  211. package/dist/tests/plan.test.js +63 -0
  212. package/dist/tests/plan.test.js.map +1 -0
  213. package/dist/tests/planning-engine.test.d.ts +1 -0
  214. package/dist/tests/planning-engine.test.js +50 -0
  215. package/dist/tests/planning-engine.test.js.map +1 -0
  216. package/dist/tests/status-cost.test.d.ts +1 -0
  217. package/dist/tests/status-cost.test.js +54 -0
  218. package/dist/tests/status-cost.test.js.map +1 -0
  219. package/dist/tests/status.test.js +8 -7
  220. package/dist/tests/status.test.js.map +1 -1
  221. package/dist/tests/trace-replay.test.d.ts +1 -0
  222. package/dist/tests/trace-replay.test.js +65 -0
  223. package/dist/tests/trace-replay.test.js.map +1 -0
  224. package/dist/tests/trace.test.js +14 -7
  225. package/dist/tests/trace.test.js.map +1 -1
  226. package/dist/ui/assets/index-Bkt7APzu.css +1 -0
  227. package/dist/ui/assets/index-CeX-06mI.js +49 -0
  228. package/dist/ui/index.html +14 -0
  229. package/framework-mcp/dist/constants.js +1 -1
  230. package/framework-mcp/{src/constants.ts → dist/framework-mcp/src/constants.js} +4 -18
  231. package/framework-mcp/{src/index.ts → dist/framework-mcp/src/index.js} +52 -53
  232. package/framework-mcp/dist/framework-mcp/src/resources/index.js +58 -0
  233. package/framework-mcp/{src/tools/control_plane/locking.ts → dist/framework-mcp/src/tools/control_plane/locking.js} +14 -21
  234. package/framework-mcp/{src/tools/control_plane/registry.ts → dist/framework-mcp/src/tools/control_plane/registry.js} +8 -11
  235. package/framework-mcp/{src/tools/definitions.ts → dist/framework-mcp/src/tools/definitions.js} +35 -5
  236. package/framework-mcp/{src/tools/file_system/batch_surgical_edit.ts → dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js} +16 -31
  237. package/framework-mcp/{src/tools/file_system/patch_file.ts → dist/framework-mcp/src/tools/file_system/patch_file.js} +9 -14
  238. package/framework-mcp/{src/tools/file_system/read_file.ts → dist/framework-mcp/src/tools/file_system/read_file.js} +9 -16
  239. package/framework-mcp/{src/tools/file_system/replace_text.ts → dist/framework-mcp/src/tools/file_system/replace_text.js} +13 -17
  240. package/framework-mcp/{src/tools/file_system/write_file.ts → dist/framework-mcp/src/tools/file_system/write_file.js} +14 -16
  241. package/framework-mcp/{src/tools/framework/audit_deps.ts → dist/framework-mcp/src/tools/framework/audit_deps.js} +9 -17
  242. package/framework-mcp/{src/tools/framework/get_status.ts → dist/framework-mcp/src/tools/framework/get_status.js} +1 -3
  243. package/framework-mcp/{src/tools/framework/orchestrate.ts → dist/framework-mcp/src/tools/framework/orchestrate.js} +1 -3
  244. package/framework-mcp/{src/tools/framework/run_tests.ts → dist/framework-mcp/src/tools/framework/run_tests.js} +9 -12
  245. package/framework-mcp/dist/framework-mcp/src/tools/framework/submit_plan.js +13 -0
  246. package/framework-mcp/{src/tools/framework/update_contract_hash.ts → dist/framework-mcp/src/tools/framework/update_contract_hash.js} +1 -3
  247. package/framework-mcp/{src/tools/framework/update_memory.ts → dist/framework-mcp/src/tools/framework/update_memory.js} +2 -4
  248. package/framework-mcp/{src/tools/index.ts → dist/framework-mcp/src/tools/index.js} +5 -7
  249. package/framework-mcp/{src/tools/memory/get_insights.ts → dist/framework-mcp/src/tools/memory/get_insights.js} +4 -11
  250. package/framework-mcp/{src/tools/memory/read_memory.ts → dist/framework-mcp/src/tools/memory/read_memory.js} +3 -6
  251. package/framework-mcp/{src/tools/messaging/log_action.ts → dist/framework-mcp/src/tools/messaging/log_action.js} +2 -8
  252. package/framework-mcp/{src/tools/messaging/send_message.ts → dist/framework-mcp/src/tools/messaging/send_message.js} +19 -22
  253. package/framework-mcp/{src/tools/observability/check_ports.ts → dist/framework-mcp/src/tools/observability/check_ports.js} +6 -10
  254. package/framework-mcp/{src/tools/observability/get_health.ts → dist/framework-mcp/src/tools/observability/get_health.js} +1 -6
  255. package/framework-mcp/{src/tools/quality/check_lint.ts → dist/framework-mcp/src/tools/quality/check_lint.js} +3 -9
  256. package/framework-mcp/{src/tools/search/get_gaps.ts → dist/framework-mcp/src/tools/search/get_gaps.js} +12 -18
  257. package/framework-mcp/{src/tools/search/get_map.ts → dist/framework-mcp/src/tools/search/get_map.js} +14 -19
  258. package/framework-mcp/{src/tools/search/grep_search.ts → dist/framework-mcp/src/tools/search/grep_search.js} +26 -26
  259. package/framework-mcp/{src/tools/search/list_dir.ts → dist/framework-mcp/src/tools/search/list_dir.js} +4 -10
  260. package/framework-mcp/{src/tools/shell/run_command.ts → dist/framework-mcp/src/tools/shell/run_command.js} +1 -11
  261. package/framework-mcp/dist/framework-mcp/src/tools/types.js +1 -0
  262. package/framework-mcp/{src/utils/cli.ts → dist/framework-mcp/src/utils/cli.js} +25 -19
  263. package/framework-mcp/dist/framework-mcp/src/utils/compliance.js +231 -0
  264. package/framework-mcp/{src/utils/fs.ts → dist/framework-mcp/src/utils/fs.js} +9 -10
  265. package/framework-mcp/{src/utils/metrics.ts → dist/framework-mcp/src/utils/metrics.js} +11 -28
  266. package/framework-mcp/dist/framework-mcp/src/utils/permissions.js +71 -0
  267. package/framework-mcp/{src/utils/security.ts → dist/framework-mcp/src/utils/security.js} +9 -15
  268. package/framework-mcp/dist/index.js +29 -5
  269. package/framework-mcp/dist/resources/index.js +58 -0
  270. package/{src/cli/adapters/core.ts → framework-mcp/dist/src/cli/adapters/core.js} +21 -41
  271. package/{src/cli/adapters/index.ts → framework-mcp/dist/src/cli/adapters/index.js} +1 -1
  272. package/{src/cli/adapters/paths.ts → framework-mcp/dist/src/cli/adapters/paths.js} +19 -53
  273. package/{src/cli/adapters/scaffold.ts → framework-mcp/dist/src/cli/adapters/scaffold.js} +18 -42
  274. package/{src/cli/adapters/utils.ts → framework-mcp/dist/src/cli/adapters/utils.js} +19 -31
  275. package/{src/cli/commands/approve.ts → framework-mcp/dist/src/cli/commands/approve.js} +15 -25
  276. package/{src/cli/commands/check.ts → framework-mcp/dist/src/cli/commands/check.js} +36 -43
  277. package/{src/cli/commands/compliance.ts → framework-mcp/dist/src/cli/commands/compliance.js} +10 -15
  278. package/{src/cli/commands/contract.ts → framework-mcp/dist/src/cli/commands/contract.js} +13 -31
  279. package/framework-mcp/dist/src/cli/commands/dashboard.js +123 -0
  280. package/{src/cli/commands/explorer.ts → framework-mcp/dist/src/cli/commands/explorer.js} +14 -17
  281. package/{src/cli/commands/git.ts → framework-mcp/dist/src/cli/commands/git.js} +15 -14
  282. package/framework-mcp/dist/src/cli/commands/init/create-agent.js +58 -0
  283. package/{src/cli/commands/init/scaffold-core.ts → framework-mcp/dist/src/cli/commands/init/scaffold-core.js} +35 -59
  284. package/framework-mcp/dist/src/cli/commands/init/scaffold-docs.js +34 -0
  285. package/{src/cli/commands/init/scaffold-ops.ts → framework-mcp/dist/src/cli/commands/init/scaffold-ops.js} +19 -22
  286. package/{src/cli/commands/init/scaffold-standards.ts → framework-mcp/dist/src/cli/commands/init/scaffold-standards.js} +20 -20
  287. package/{src/cli/commands/init.ts → framework-mcp/dist/src/cli/commands/init.js} +51 -77
  288. package/{src/cli/commands/knowledge.ts → framework-mcp/dist/src/cli/commands/knowledge.js} +9 -11
  289. package/{src/cli/commands/lint.ts → framework-mcp/dist/src/cli/commands/lint.js} +5 -6
  290. package/framework-mcp/dist/src/cli/commands/log.js +10 -0
  291. package/{src/cli/commands/memory.ts → framework-mcp/dist/src/cli/commands/memory.js} +1 -3
  292. package/framework-mcp/dist/src/cli/commands/orchestrate.js +159 -0
  293. package/framework-mcp/dist/src/cli/commands/plan.js +117 -0
  294. package/{src/cli/commands/script.ts → framework-mcp/dist/src/cli/commands/script.js} +6 -7
  295. package/{src/cli/commands/security.ts → framework-mcp/dist/src/cli/commands/security.js} +6 -8
  296. package/framework-mcp/dist/src/cli/commands/status.js +97 -0
  297. package/framework-mcp/dist/src/cli/commands/trace.js +109 -0
  298. package/{src/cli/index.ts → framework-mcp/dist/src/cli/index.js} +80 -64
  299. package/{src/cli/shims.ts → framework-mcp/dist/src/cli/shims.js} +15 -15
  300. package/{src/cli/utils/claude.ts → framework-mcp/dist/src/cli/utils/claude.js} +8 -15
  301. package/{src/cli/utils/compliance.ts → framework-mcp/dist/src/cli/utils/compliance.js} +18 -36
  302. package/{src/cli/utils/config-schema.ts → framework-mcp/dist/src/cli/utils/config-schema.js} +0 -6
  303. package/{src/cli/utils/fs.ts → framework-mcp/dist/src/cli/utils/fs.js} +34 -67
  304. package/{src/cli/utils/i18n.ts → framework-mcp/dist/src/cli/utils/i18n.js} +3 -17
  305. package/{src/cli/utils/memory.ts → framework-mcp/dist/src/cli/utils/memory.js} +87 -114
  306. package/{src/cli/utils/pkg.ts → framework-mcp/dist/src/cli/utils/pkg.js} +120 -155
  307. package/{src/cli/utils/schemas.ts → framework-mcp/dist/src/cli/utils/schemas.js} +0 -3
  308. package/{src/cli/utils/string.ts → framework-mcp/dist/src/cli/utils/string.js} +18 -24
  309. package/{src/cli/utils/time.ts → framework-mcp/dist/src/cli/utils/time.js} +4 -4
  310. package/{src/cli/utils/ui.ts → framework-mcp/dist/src/cli/utils/ui.js} +9 -17
  311. package/{src/contracts/tasks.ts → framework-mcp/dist/src/contracts/tasks.js} +0 -6
  312. package/framework-mcp/dist/src/dashboard/vite.config.js +15 -0
  313. package/framework-mcp/dist/src/modules/adapters/definitions.js +140 -0
  314. package/framework-mcp/dist/src/modules/adapters/registry.js +18 -0
  315. package/{src/modules/adapters/shared.ts → framework-mcp/dist/src/modules/adapters/shared.js} +9 -25
  316. package/framework-mcp/dist/src/modules/adapters/types.js +1 -0
  317. package/{src/modules/agents/definitions.ts → framework-mcp/dist/src/modules/agents/definitions.js} +158 -161
  318. package/{src/modules/agents/registry/analyst.ts → framework-mcp/dist/src/modules/agents/registry/analyst.js} +9 -14
  319. package/{src/modules/agents/registry/architect.ts → framework-mcp/dist/src/modules/agents/registry/architect.js} +9 -14
  320. package/{src/modules/agents/registry/backend.ts → framework-mcp/dist/src/modules/agents/registry/backend.js} +16 -13
  321. package/{src/modules/agents/registry/database.ts → framework-mcp/dist/src/modules/agents/registry/database.js} +16 -14
  322. package/{src/modules/agents/registry/devops.ts → framework-mcp/dist/src/modules/agents/registry/devops.js} +15 -14
  323. package/{src/modules/agents/registry/explorer.ts → framework-mcp/dist/src/modules/agents/registry/explorer.js} +9 -14
  324. package/{src/modules/agents/registry/frontend.ts → framework-mcp/dist/src/modules/agents/registry/frontend.js} +17 -14
  325. package/{src/modules/agents/registry/git.ts → framework-mcp/dist/src/modules/agents/registry/git.js} +9 -14
  326. package/{src/modules/agents/registry/manager.ts → framework-mcp/dist/src/modules/agents/registry/manager.js} +10 -15
  327. package/{src/modules/agents/registry/mobile.ts → framework-mcp/dist/src/modules/agents/registry/mobile.js} +9 -14
  328. package/{src/modules/agents/registry/native.ts → framework-mcp/dist/src/modules/agents/registry/native.js} +9 -14
  329. package/{src/modules/agents/registry/quality.ts → framework-mcp/dist/src/modules/agents/registry/quality.js} +9 -14
  330. package/{src/modules/agents/registry/security.ts → framework-mcp/dist/src/modules/agents/registry/security.js} +15 -14
  331. package/framework-mcp/dist/src/modules/agents/types.js +1 -0
  332. package/framework-mcp/dist/src/modules/engines/evaluation-engine.js +102 -0
  333. package/framework-mcp/dist/src/modules/engines/health-engine.js +49 -0
  334. package/framework-mcp/dist/src/modules/engines/planning-engine.js +78 -0
  335. package/framework-mcp/dist/src/modules/engines/risk-engine.js +105 -0
  336. package/framework-mcp/dist/src/modules/engines/routing-engine.js +73 -0
  337. package/framework-mcp/dist/src/modules/engines/types.js +1 -0
  338. package/{src/modules/skills/definitions.ts → framework-mcp/dist/src/modules/skills/definitions.js} +0 -1
  339. package/{src/shared/constants.ts → framework-mcp/dist/src/shared/constants.js} +40 -71
  340. package/{src/shared/errors.ts → framework-mcp/dist/src/shared/errors.js} +10 -17
  341. package/{src/shared/fs.ts → framework-mcp/dist/src/shared/fs.js} +14 -13
  342. package/{src/shared/logger.ts → framework-mcp/dist/src/shared/logger.js} +28 -51
  343. package/framework-mcp/dist/src/shared/storage.js +207 -0
  344. package/framework-mcp/dist/src/shared/types.js +12 -0
  345. package/framework-mcp/dist/tools/control_plane/locking.js +3 -3
  346. package/framework-mcp/dist/tools/control_plane/registry.js +3 -2
  347. package/framework-mcp/dist/tools/definitions.js +33 -1
  348. package/framework-mcp/dist/tools/file_system/batch_surgical_edit.js +8 -3
  349. package/framework-mcp/dist/tools/file_system/patch_file.js +8 -3
  350. package/framework-mcp/dist/tools/file_system/read_file.js +3 -3
  351. package/framework-mcp/dist/tools/file_system/replace_text.js +8 -3
  352. package/framework-mcp/dist/tools/file_system/write_file.js +10 -5
  353. package/framework-mcp/dist/tools/framework/audit_deps.js +2 -2
  354. package/framework-mcp/dist/tools/framework/run_tests.js +2 -2
  355. package/framework-mcp/dist/tools/framework/submit_plan.js +13 -0
  356. package/framework-mcp/dist/tools/framework/update_memory.js +1 -1
  357. package/framework-mcp/dist/tools/index.js +2 -0
  358. package/framework-mcp/dist/tools/memory/get_insights.js +1 -1
  359. package/framework-mcp/dist/tools/messaging/log_action.js +1 -1
  360. package/framework-mcp/dist/tools/messaging/send_message.js +5 -5
  361. package/framework-mcp/dist/tools/observability/check_ports.js +1 -1
  362. package/framework-mcp/dist/tools/quality/check_lint.js +2 -2
  363. package/framework-mcp/dist/tools/search/get_gaps.js +1 -1
  364. package/framework-mcp/dist/tools/search/grep_search.js +3 -3
  365. package/framework-mcp/dist/utils/compliance.js +158 -5
  366. package/framework-mcp/dist/utils/permissions.js +71 -0
  367. package/framework-mcp/package.json +7 -1
  368. package/mcp.json +1 -1
  369. package/package.json +10 -6
  370. package/templates/prompts/contract-design-recipe.md +1 -1
  371. package/templates/prompts/db-management-recipe.md +3 -3
  372. package/templates/prompts/deployment-recipe.md +3 -3
  373. package/templates/prompts/performance-optimization-recipe.md +3 -3
  374. package/templates/prompts/pull-request-template.md +2 -2
  375. package/templates/prompts/security-audit-recipe.md +3 -3
  376. package/templates/standards/crud-governance.md +1 -1
  377. package/templates/standards/deployment-standards.md +1 -1
  378. package/templates/standards/governance-standards.md +1 -1
  379. package/templates/standards/llm-governance.md +1 -1
  380. package/templates/standards/nextjs-standards.md +13 -0
  381. package/templates/standards/observability-standards.md +1 -1
  382. package/templates/standards/security-audit-standards.md +1 -1
  383. package/templates/standards/security-standards.md +1 -1
  384. package/templates/standards/testing-standards.md +1 -1
  385. package/templates/standards/vite-standards.md +13 -0
  386. package/framework-mcp/package-lock.json +0 -1191
  387. package/framework-mcp/src/declarations.d.ts +0 -17
  388. package/framework-mcp/src/tools/types.ts +0 -89
  389. package/framework-mcp/src/utils/compliance.ts +0 -95
  390. package/framework-mcp/tests/tools/file_system/file_system_tools.test.ts +0 -212
  391. package/framework-mcp/tests/tools/messaging/send_message.test.ts +0 -136
  392. package/framework-mcp/tests/tools/quality/check_lint.test.ts +0 -46
  393. package/framework-mcp/tests/tools/shell/run_command.test.ts +0 -55
  394. package/framework-mcp/tsconfig.json +0 -14
  395. package/src/cli/commands/init/scaffold-docs.ts +0 -44
  396. package/src/cli/commands/log.ts +0 -37
  397. package/src/cli/commands/orchestrate.ts +0 -450
  398. package/src/cli/commands/plan.ts +0 -113
  399. package/src/cli/commands/status.ts +0 -44
  400. package/src/cli/commands/trace.ts +0 -31
  401. package/src/modules/adapters/definitions.ts +0 -171
  402. package/src/modules/adapters/registry.ts +0 -27
  403. package/src/modules/adapters/types.ts +0 -16
  404. package/src/modules/agents/types.ts +0 -37
  405. package/src/schema/agent-lifecycle-schema.json +0 -59
  406. package/src/shared/types.ts +0 -20
  407. /package/{src/contracts/index.ts → framework-mcp/dist/src/contracts/index.js} +0 -0
@@ -3,62 +3,62 @@ import fs from "fs";
3
3
  import { approveCommand } from "./commands/approve.js";
4
4
  import { checkCommand } from "./commands/check.js";
5
5
  import { updateApiContractCommand, verifyApiContractCommand } from "./commands/contract.js";
6
+ import { dashboardCommand } from "./commands/dashboard.js";
6
7
  import { initCommand } from "./commands/init.js";
7
8
  import { updateProjectMemoryCommand } from "./commands/memory.js";
8
9
  import { orchestrateCommand, sendMessage } from "./commands/orchestrate.js";
9
- import { planCommand } from "./commands/plan.js";
10
+ import { planCommand, submitPlanCommand } from "./commands/plan.js";
10
11
  import { statusCommand } from "./commands/status.js";
11
- import { traceNewCommand } from "./commands/trace.js";
12
+ import { traceNewCommand, traceReplayCommand } from "./commands/trace.js";
12
13
  import { getMemoryPath, readActiveTraceId } from "./utils/memory.js";
13
14
  import { getPackageVersion, getValidatorPath } from "./utils/pkg.js";
14
-
15
15
  /**
16
16
  * Main CLI entry point.
17
17
  */
18
18
  async function main() {
19
19
  const args = process.argv.slice(2);
20
20
  const command = args[0];
21
-
22
21
  const KNOWN_COMMANDS = [
23
- "init", "check", "status", "trace:new", "update_project_memory",
24
- "plan", "orchestrate", "loop", "verify-contract", "update-contract",
22
+ "init", "check", "status", "trace:new", "trace:replay", "update_project_memory",
23
+ "plan", "plan:submit", "orchestrate", "loop", "verify-contract", "update-contract", "dashboard",
25
24
  "validate", "validate-army", "check:al", "version", "-v", "--version", "help", "-h", "--help",
26
25
  "git:commit", "git:sync", "check:compliance", "explorer:graph", "explorer:audit",
27
- "knowledge:update", "knowledge:search", "log:action", "run-script", "security:audit", "check:lint", "approve"
26
+ "knowledge:update", "knowledge:search", "log:action", "run-script", "security:audit", "check:lint", "approve", "create-agent"
28
27
  ];
29
-
30
28
  // Handle @agent delegation syntax
31
29
  if (command?.startsWith("@")) {
32
30
  const to = command;
33
31
  const content = args.slice(1).join(" ");
34
32
  if (!content) {
35
- process.stderr.write(`❌ Error: Missing task content for ${to}.\n`);
33
+ process.stderr.write(`[ERROR] Error: Missing task content for ${to}.\n`);
36
34
  process.stderr.write(`Usage: atabey ${to} "Your task description"\n`);
37
35
  process.exit(64);
38
36
  }
39
-
40
37
  const memoryPath = getMemoryPath();
41
-
42
38
  let traceId = "T-000";
43
39
  if (fs.existsSync(memoryPath)) {
44
40
  const memoryContent = fs.readFileSync(memoryPath, "utf8");
45
41
  const tid = readActiveTraceId(memoryContent);
46
- if (tid) traceId = tid.trim();
42
+ if (tid)
43
+ traceId = tid.trim();
47
44
  }
48
-
45
+ const taskPayload = {
46
+ traceId,
47
+ task: content,
48
+ priority: "NORMAL",
49
+ agent: to
50
+ };
49
51
  await sendMessage({
50
52
  from: "@manager",
51
53
  to,
52
54
  category: "DELEGATION",
53
- content,
55
+ content: JSON.stringify(taskPayload),
54
56
  traceId
55
57
  });
56
-
57
- process.stdout.write(`✅ Task delegated to ${to} (Trace: ${traceId})\n`);
58
- process.stdout.write("👉 Run \"atabey orchestrate\" to process.\n");
58
+ process.stdout.write(`[OK] Task delegated to ${to} (Trace: ${traceId})\n`);
59
+ process.stdout.write("[INFO] Run \"atabey orchestrate\" to process.\n");
59
60
  return;
60
61
  }
61
-
62
62
  switch (command) {
63
63
  case "init": {
64
64
  const dryRun = args.includes("--dry-run");
@@ -68,19 +68,36 @@ async function main() {
68
68
  await initCommand(adapter, { dryRun, unified: isUnified, yes: forceYes });
69
69
  break;
70
70
  }
71
-
72
71
  case "check":
73
72
  await checkCommand();
74
73
  break;
75
-
76
74
  case "plan":
77
75
  await planCommand();
78
76
  break;
79
-
77
+ case "plan:submit": {
78
+ const planData = args[1];
79
+ if (!planData) {
80
+ process.stderr.write("[ERROR] Error: JSON plan data is required.\n");
81
+ process.exit(64);
82
+ }
83
+ try {
84
+ const tasks = JSON.parse(planData);
85
+ await submitPlanCommand(tasks);
86
+ }
87
+ catch (e) {
88
+ process.stderr.write(`[ERROR] Error: Invalid JSON plan data: ${e.message}\n`);
89
+ process.exit(64);
90
+ }
91
+ break;
92
+ }
93
+ case "dashboard": {
94
+ const port = parseInt(args[1]) || 4200;
95
+ await dashboardCommand(port);
96
+ break;
97
+ }
80
98
  case "status":
81
99
  await statusCommand();
82
100
  break;
83
-
84
101
  case "trace:new": {
85
102
  const description = args[1] || "Default task";
86
103
  const agent = args[2] || "manager";
@@ -88,41 +105,44 @@ async function main() {
88
105
  await traceNewCommand(description, agent, priority);
89
106
  break;
90
107
  }
91
-
108
+ case "trace:replay": {
109
+ const traceId = args[1];
110
+ if (!traceId) {
111
+ process.stderr.write("[ERROR] Error: traceId is required.\n");
112
+ process.exit(64);
113
+ }
114
+ await traceReplayCommand(traceId);
115
+ break;
116
+ }
92
117
  case "update_project_memory": {
93
118
  const section = args[1];
94
119
  const content = args[2];
95
120
  if (!section || !content) {
96
- process.stderr.write(" Error: section and content are required.\n");
121
+ process.stderr.write("[ERROR] Error: section and content are required.\n");
97
122
  process.exit(64);
98
123
  }
99
124
  await updateProjectMemoryCommand(section, content);
100
125
  break;
101
126
  }
102
-
103
127
  case "orchestrate":
104
128
  case "loop":
105
129
  await orchestrateCommand();
106
130
  break;
107
-
108
131
  case "approve": {
109
132
  const traceId = args[1];
110
133
  if (!traceId) {
111
- process.stderr.write(" Error: traceId is required.\n");
134
+ process.stderr.write("[ERROR] Error: traceId is required.\n");
112
135
  process.exit(64);
113
136
  }
114
137
  await approveCommand(traceId);
115
138
  break;
116
139
  }
117
-
118
140
  case "verify-contract":
119
141
  await verifyApiContractCommand();
120
142
  break;
121
-
122
143
  case "update-contract":
123
144
  await updateApiContractCommand();
124
145
  break;
125
-
126
146
  case "validate":
127
147
  case "validate-army":
128
148
  case "check:al": {
@@ -130,12 +150,12 @@ async function main() {
130
150
  try {
131
151
  const validatorPath = getValidatorPath();
132
152
  execSync(`node "${validatorPath}"`, { stdio: "inherit" });
133
- } catch {
134
- // handled by validator
153
+ }
154
+ catch {
155
+ // handled by validator
135
156
  }
136
157
  break;
137
158
  }
138
-
139
159
  case "git:commit": {
140
160
  const memoryContent = fs.existsSync(getMemoryPath()) ? fs.readFileSync(getMemoryPath(), "utf8") : "";
141
161
  const traceId = readActiveTraceId(memoryContent) || "T-000";
@@ -143,34 +163,29 @@ async function main() {
143
163
  await gitCommitCommand(traceId);
144
164
  break;
145
165
  }
146
-
147
166
  case "git:sync": {
148
167
  const { gitSyncCommand } = await import("./commands/git.js");
149
168
  await gitSyncCommand();
150
169
  break;
151
170
  }
152
-
153
171
  case "check:compliance": {
154
172
  const targetPath = args[1] || "src";
155
173
  const { complianceCheckCommand } = await import("./commands/compliance.js");
156
174
  await complianceCheckCommand(targetPath);
157
175
  break;
158
176
  }
159
-
160
177
  case "explorer:graph": {
161
178
  const targetPath = args[1] || "src";
162
179
  const { explorerGraphCommand } = await import("./commands/explorer.js");
163
180
  await explorerGraphCommand(targetPath);
164
181
  break;
165
182
  }
166
-
167
183
  case "explorer:audit": {
168
184
  const targetPath = args[1] || "src";
169
185
  const { explorerAuditCommand } = await import("./commands/explorer.js");
170
186
  await explorerAuditCommand(targetPath);
171
187
  break;
172
188
  }
173
-
174
189
  case "knowledge:update": {
175
190
  const topic = args[1];
176
191
  const content = args[2];
@@ -178,14 +193,12 @@ async function main() {
178
193
  await updateKnowledgeBaseCommand(topic, content);
179
194
  break;
180
195
  }
181
-
182
196
  case "knowledge:search": {
183
197
  const query = args[1];
184
198
  const { searchKnowledgeBaseCommand } = await import("./commands/knowledge.js");
185
199
  await searchKnowledgeBaseCommand(query);
186
200
  break;
187
201
  }
188
-
189
202
  case "log:action": {
190
203
  const agent = args[1];
191
204
  const action = args[2];
@@ -197,7 +210,6 @@ async function main() {
197
210
  await logAgentActionCommand({ agent, action, status, summary, traceId });
198
211
  break;
199
212
  }
200
-
201
213
  case "run-script": {
202
214
  const script = args[1];
203
215
  const projectPath = args[2] || ".";
@@ -205,45 +217,49 @@ async function main() {
205
217
  await runScriptCommand(script, projectPath);
206
218
  break;
207
219
  }
208
-
220
+ case "create-agent": {
221
+ const name = args[1];
222
+ if (!name) {
223
+ process.stderr.write("[ERROR] Error: Agent name is required.\n");
224
+ process.exit(64);
225
+ }
226
+ const { createAgentCommand } = await import("./commands/init/create-agent.js");
227
+ await createAgentCommand(name);
228
+ break;
229
+ }
209
230
  case "security:audit": {
210
231
  const targetPath = args[1] || "src";
211
232
  const { securityAuditCommand } = await import("./commands/security.js");
212
233
  await securityAuditCommand(targetPath);
213
234
  break;
214
235
  }
215
-
216
236
  case "check:lint": {
217
237
  const { lintCommand } = await import("./commands/lint.js");
218
238
  await lintCommand();
219
239
  break;
220
240
  }
221
-
222
241
  case "version":
223
242
  case "-v":
224
243
  case "--version":
225
244
  process.stdout.write(`v${getPackageVersion()}\n`);
226
245
  break;
227
-
228
246
  case "help":
229
247
  case "-h":
230
248
  case "--help":
231
249
  showHelp();
232
250
  break;
233
-
234
251
  default:
235
252
  if (command && !KNOWN_COMMANDS.includes(command)) {
236
- // Natural language request fallback to @manager
253
+ // Natural language request fallback to @manager
237
254
  const content = args.join(" ");
238
255
  const memoryPath = getMemoryPath();
239
-
240
256
  let traceId = "T-000";
241
257
  if (fs.existsSync(memoryPath)) {
242
258
  const memoryContent = fs.readFileSync(memoryPath, "utf8");
243
259
  const tid = readActiveTraceId(memoryContent);
244
- if (tid) traceId = tid.trim();
260
+ if (tid)
261
+ traceId = tid.trim();
245
262
  }
246
-
247
263
  await sendMessage({
248
264
  from: "@user",
249
265
  to: "@manager",
@@ -251,19 +267,18 @@ async function main() {
251
267
  content,
252
268
  traceId
253
269
  });
254
-
255
- process.stdout.write(`📡 Request sent to @manager: "${content}" (Trace: ${traceId})\n`);
256
- process.stdout.write("👉 Run 'atabey orchestrate' to process.\n");
257
- } else {
270
+ process.stdout.write(`[SIGNAL] Request sent to @manager: "${content}" (Trace: ${traceId})\n`);
271
+ process.stdout.write("[INFO] Run 'atabey orchestrate' to process.\n");
272
+ }
273
+ else {
258
274
  showHelp();
259
275
  }
260
276
  break;
261
277
  }
262
278
  }
263
-
264
279
  function showHelp() {
265
280
  process.stdout.write(`
266
- 🎖️ Agent Atabey CLI (v${getPackageVersion()}) — The Supreme AI Orchestrator
281
+ [ATABEY] Agent Atabey CLI (v${getPackageVersion()}) — The Supreme AI Orchestrator
267
282
 
268
283
  Usage:
269
284
  atabey <command> [options]
@@ -276,8 +291,11 @@ Commands:
276
291
  Options: --unified, --yes
277
292
  check Perform an enterprise-grade system health check
278
293
  status Show active phase, trace ID, and agent statuses
294
+ dashboard [port] Launch the Hermes Visual Control Plane (default: 4200)
279
295
  trace:new <desc> Start a new task chain with a unique Trace ID
280
- plan Read all docs/ files and create planning tasks
296
+ trace:replay <id> Replay chronological message exchanges of a Trace ID
297
+ plan Read docs/ and create planning tasks (Static)
298
+ plan:submit <json> Submit a structured DAG plan for execution (Dynamic)
281
299
  orchestrate Start the dynamic Hermes agent orchestration loop
282
300
  verify-contract Validate type alignment between backend and frontend
283
301
  update-contract Generate and synchronize a new contract hash
@@ -303,20 +321,18 @@ Example:
303
321
  atabey @backend "Create the login page"
304
322
  \n`);
305
323
  }
306
-
307
324
  import { AtabeyBaseError } from "../shared/errors.js";
308
325
  import { logger } from "../shared/logger.js";
309
-
310
326
  main().catch((err) => {
311
327
  if (err instanceof AtabeyBaseError) {
312
- process.stderr.write(`\n [${err.code}] Error: ${err.message}\n`);
328
+ process.stderr.write(`\n[ERROR] [${err.code}] Error: ${err.message}\n`);
313
329
  if (err.solution) {
314
- process.stderr.write(`💡 Solution Tip: ${err.solution}\n\n`);
330
+ process.stderr.write(`[TIP] Solution Tip: ${err.solution}\n\n`);
315
331
  }
316
- } else {
317
- process.stderr.write(`\n❌ Fatal Error: ${err.message || String(err)}\n`);
318
332
  }
319
-
333
+ else {
334
+ process.stderr.write(`\n[ERROR] Fatal Error: ${err.message || String(err)}\n`);
335
+ }
320
336
  logger.fatal("Fatal exception during CLI execution", err);
321
337
  process.exit(1);
322
338
  });
@@ -1,63 +1,63 @@
1
- export const SHIM_TEMPLATES: Record<string, string> = {
2
- gemini: `# 🎖️ Agent Atabey — GEMINI Strategy (Command Intelligence)
1
+ export const SHIM_TEMPLATES = {
2
+ gemini: `# [ATABEY] Agent Atabey — GEMINI Strategy (Command Intelligence)
3
3
 
4
4
  You are the **Gemini Commander**. You represent the project's **Strategic Decision Center**. Your intelligence is derived from project history, architectural memory, and governance compliance.
5
5
 
6
- ## 🏛️ Directives
6
+ ## [GOV] Directives
7
7
  - **Constitutional Supremacy:** Read \`{{FRAMEWORK_DIR}}/ATABEY.md\` first. You are the final arbiter of these rules.
8
8
  - **Strategic Memory Sync:** Always read \`{{FRAMEWORK_DIR}}/memory/PROJECT_MEMORY.md\` and \`PROJECT_MEMORY.md\` at the start.
9
9
  - **Orchestration Audit:** Before delegating, verify that the task matches the current Phase and Trace ID context.
10
10
  - **Enterprise Reasoning:** Focus on long-term maintainability, security, and scalability in every strategic decision.
11
11
  `,
12
- "antigravity-cli": `# 🎖️ Agent Atabey — ANTIGRAVITY Strategy (Internal Discipline)
12
+ "antigravity-cli": `# [ATABEY] Agent Atabey — ANTIGRAVITY Strategy (Internal Discipline)
13
13
 
14
14
  You are the **Antigravity Specialist**. You represent the **Military Academy** of the framework, preserving internal standards and coding discipline.
15
15
 
16
- ## 🏛️ Directives
16
+ ## [GOV] Directives
17
17
  - **Constitutional Supremacy:** Read \`{{FRAMEWORK_DIR}}/ATABEY.md\` first.
18
18
  - **Standard Enforcement:** You are responsible for ensuring that all code adheres to the 26+ corporate standards in \`{{FRAMEWORK_DIR}}/knowledge/\`.
19
19
  - **Sandbox Discipline:** Maintain isolated and high-discipline development environments.
20
20
  `,
21
- claude: `# 🎖️ Agent Atabey — CLAUDE Strategy (Operational Surgery)
21
+ claude: `# [ATABEY] Agent Atabey — CLAUDE Strategy (Operational Surgery)
22
22
 
23
23
  You are the **Claude Field Engineer**. You represent the **Operational Cerrahi (Surgical)** wing of the army. Your mission is precision execution with minimal footprint.
24
24
 
25
- ## 🏛️ Directives
25
+ ## [GOV] Directives
26
26
  - **Surgical Precision (MANDATORY):** NEVER rewrite an entire file. Use \`replace_text\` or \`patch_file\` tools exclusively.
27
27
  - **Token Economy:** Minimize API usage by targetting only the exact lines of code needed.
28
28
  - **Traceability:** Ensure every change is linked to an active Trace ID and logged traceable under \`{{FRAMEWORK_DIR}}/logs/\`.
29
29
  - **Phase Discipline:** Do not attempt Phase 2 tasks if Phase 1 contracts are not sealed.
30
30
  `,
31
- grok: `# 🎖️ Agent Atabey — GROK Strategy (Scouting Wing)
31
+ grok: `# [ATABEY] Agent Atabey — GROK Strategy (Scouting Wing)
32
32
 
33
33
  You are the **Grok Explorer**. You represent the **Otonom Keşif Kanadı (Autonomous Scouting Wing)**. Your mission is experimental discovery and boundary testing.
34
34
 
35
- ## 🏛️ Directives
35
+ ## [GOV] Directives
36
36
  - **Architecture Discovery:** Use \`get_project_map\` and \`get_project_gaps\` to map unexplored territory before any specialist acts.
37
37
  - **Boundary Testing:** Identify architectural weaknesses or security gaps before they become critical.
38
38
  - **Experimental Protocol:** Test futuristic agent behaviors and report findings to the **Commander**.
39
39
  `,
40
- cursor: `# 🎖️ Agent Atabey — CURSOR Strategy (Implementer)
40
+ cursor: `# [ATABEY] Agent Atabey — CURSOR Strategy (Implementer)
41
41
 
42
42
  You are the **Cursor Implementer**. You are the **Kod İşçisi (Code Worker)** integrated directly into the IDE.
43
43
 
44
- ## 🏛️ Directives
44
+ ## [GOV] Directives
45
45
  - **IDE Synergy:** Leverage Cursor's native context and Atabey's governance to write high-quality, compliant code.
46
46
  - **Atomic Implementation:** Focus on implementing the specific task delegated by the @manager.
47
47
  `,
48
- codex: `# 🎖️ Agent Atabey — COPILOT Strategy (Assistant)
48
+ codex: `# [ATABEY] Agent Atabey — COPILOT Strategy (Assistant)
49
49
 
50
50
  You are the **Copilot Assistant**. You represent the **Yardımcı Geliştirici (Assistant Developer)**.
51
51
 
52
- ## 🏛️ Directives
52
+ ## [GOV] Directives
53
53
  - **Predictive Support:** Provide code completions and suggestions that strictly adhere to the project's \`{{FRAMEWORK_DIR}}/ATABEY.md\` rules.
54
54
  - **Rapid Prototyping:** Support the army by generating boilerplate that follows established enterprise patterns.
55
55
  `,
56
- local: `# 🎖️ Agent Atabey — LOCAL LLM Strategy (Private Intelligence)
56
+ local: `# [ATABEY] Agent Atabey — LOCAL LLM Strategy (Private Intelligence)
57
57
 
58
58
  You are the **Local Private Intelligence**. You represent the project's **Private & Secure Command Wing**. Your intelligence is derived entirely from local models (Ollama, vLLM, etc.) and project-specific knowledge.
59
59
 
60
- ## 🏛️ Directives
60
+ ## [GOV] Directives
61
61
  - **Constitutional Supremacy:** Read \`{{FRAMEWORK_DIR}}/ATABEY.md\` first. You are the final arbiter of these rules.
62
62
  - **Zero Cloud Policy:** Ensure all operations remain local and secure.
63
63
  - **Trace ID Discipline:** Every local inference and code generation MUST follow the active Trace ID.
@@ -1,14 +1,13 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
3
  import { writeTextFile } from "./fs.js";
4
-
5
4
  /**
6
5
  * Finds the Claude config file path (if it exists).
7
6
  */
8
- export function findClaudeConfigPath(): string | null {
7
+ export function findClaudeConfigPath() {
9
8
  const home = process.env.HOME || process.env.USERPROFILE;
10
- if (!home) return null;
11
-
9
+ if (!home)
10
+ return null;
12
11
  const possiblePaths = [
13
12
  // Claude Desktop
14
13
  path.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json"), // macOS Claude Desktop
@@ -21,7 +20,6 @@ export function findClaudeConfigPath(): string | null {
21
20
  path.join(home, "Library", "Application Support", "Claude Code", "config.json"),
22
21
  path.join(home, ".config", "Claude", "config.json"),
23
22
  ];
24
-
25
23
  for (const p of possiblePaths) {
26
24
  if (fs.existsSync(p)) {
27
25
  return p;
@@ -29,35 +27,30 @@ export function findClaudeConfigPath(): string | null {
29
27
  }
30
28
  return null;
31
29
  }
32
-
33
30
  /**
34
31
  * Adds or updates an MCP server entry in Claude's config file.
35
32
  */
36
- export function addMcpServerToClaude(configPath: string, serverName: string, serverConfig: Record<string, unknown>): boolean {
33
+ export function addMcpServerToClaude(configPath, serverName, serverConfig) {
37
34
  try {
38
- let config: { mcpServers?: Record<string, Record<string, unknown>> } = { mcpServers: {} };
39
-
35
+ let config = { mcpServers: {} };
40
36
  if (fs.existsSync(configPath)) {
41
37
  const content = fs.readFileSync(configPath, "utf8");
42
38
  config = JSON.parse(content);
43
39
  }
44
-
45
40
  if (!config.mcpServers) {
46
41
  config.mcpServers = {};
47
42
  }
48
-
49
43
  config.mcpServers[serverName] = serverConfig;
50
-
51
44
  // Ensure parent directory exists
52
45
  const dir = path.dirname(configPath);
53
46
  if (!fs.existsSync(dir)) {
54
47
  fs.mkdirSync(dir, { recursive: true });
55
48
  }
56
-
57
49
  writeTextFile(configPath, JSON.stringify(config, null, 2));
58
50
  return true;
59
- } catch (e) {
60
- console.error(`⚠️ Failed to add MCP server to Claude config at ${configPath}:`, e);
51
+ }
52
+ catch (e) {
53
+ console.error(`[WARN] Failed to add MCP server to Claude config at ${configPath}:`, e);
61
54
  return false;
62
55
  }
63
56
  }
@@ -1,23 +1,15 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
3
  import ts from "typescript";
4
-
5
- interface ComplianceIssue {
6
- file: string;
7
- line: number;
8
- rule: string;
9
- }
10
-
11
4
  /**
12
5
  * Enterprise Compliance Scanner (AST-Based)
13
6
  * Scans the project source code for governance and discipline violations.
14
7
  */
15
- export function scanProjectCompliance(targetDir: string = "src"): ComplianceIssue[] {
16
- const issues: ComplianceIssue[] = [];
17
- if (!fs.existsSync(targetDir)) return [];
18
-
8
+ export function scanProjectCompliance(targetDir = "src") {
9
+ const issues = [];
10
+ if (!fs.existsSync(targetDir))
11
+ return [];
19
12
  const files = getAllFiles(targetDir);
20
-
21
13
  for (const file of files) {
22
14
  // Absolute skip for critical framework and utility files to avoid self-flagging
23
15
  if (file.includes("compliance") ||
@@ -26,14 +18,18 @@ export function scanProjectCompliance(targetDir: string = "src"): ComplianceIssu
26
18
  file.includes("scaffold-ops.ts") ||
27
19
  file.includes("logger") ||
28
20
  file.includes("errors") ||
29
- file.includes("shared/fs")) continue;
30
-
21
+ file.includes("shared/fs") ||
22
+ file.includes("commands/git") ||
23
+ file.includes("commands/lint") ||
24
+ file.includes("commands/script") ||
25
+ file.includes("commands/check") ||
26
+ file.includes("cli/index.ts") ||
27
+ file.includes("adapters/shared"))
28
+ continue;
31
29
  const content = fs.readFileSync(file, "utf8");
32
-
33
30
  // --- 1. AST-Based Analysis (For Language Rules) ---
34
31
  const sourceFile = ts.createSourceFile(file, content, ts.ScriptTarget.Latest, true);
35
-
36
- const visit = (node: ts.Node) => {
32
+ const visit = (node) => {
37
33
  // Rule: No console.log allowed (excluding UI and warn/error helpers)
38
34
  if (ts.isPropertyAccessExpression(node)) {
39
35
  const expression = node.expression;
@@ -48,7 +44,6 @@ export function scanProjectCompliance(targetDir: string = "src"): ComplianceIssu
48
44
  issues.push({ file, line: line + 1, rule: `Unsafe assignment/usage of '${name}' detected (Avoid XSS)` });
49
45
  }
50
46
  }
51
-
52
47
  // Rule: No 'any' type usage
53
48
  if (ts.isTypeReferenceNode(node)) {
54
49
  if (ts.isIdentifier(node.typeName) && node.typeName.text === "any") {
@@ -60,7 +55,6 @@ export function scanProjectCompliance(targetDir: string = "src"): ComplianceIssu
60
55
  const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
61
56
  issues.push({ file, line: line + 1, rule: "Usage of 'any' keyword is forbidden" });
62
57
  }
63
-
64
58
  // Rule: Zero UI Library & child_process Policy
65
59
  if (ts.isImportDeclaration(node)) {
66
60
  const moduleSpecifier = node.moduleSpecifier;
@@ -77,7 +71,6 @@ export function scanProjectCompliance(targetDir: string = "src"): ComplianceIssu
77
71
  }
78
72
  }
79
73
  }
80
-
81
74
  // Rule: child_process dynamic usage & Raw SQL templates
82
75
  if (ts.isCallExpression(node)) {
83
76
  const expression = node.expression;
@@ -106,7 +99,6 @@ export function scanProjectCompliance(targetDir: string = "src"): ComplianceIssu
106
99
  issues.push({ file, line: line + 1, rule: "Raw SQL tagged template detected. Use Kysely query builder instead." });
107
100
  }
108
101
  }
109
-
110
102
  // Rule: Raw fs mutation check (Use atomic utilities)
111
103
  if (ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression)) {
112
104
  const prop = node.expression;
@@ -115,14 +107,12 @@ export function scanProjectCompliance(targetDir: string = "src"): ComplianceIssu
115
107
  // Skip if it's explicitly allowed (e.g. lock files)
116
108
  const args = node.arguments;
117
109
  let isLockFile = false;
118
-
119
110
  if (args.length > 0) {
120
111
  const firstArgText = args[0].getText(sourceFile).toLowerCase();
121
112
  if (firstArgText.includes("lock")) {
122
113
  isLockFile = true;
123
114
  }
124
115
  }
125
-
126
116
  if (!isLockFile) {
127
117
  const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
128
118
  issues.push({ file, line: line + 1, rule: "Use atomic utilities (writeTextFile) instead of raw fs mutations" });
@@ -130,12 +120,9 @@ export function scanProjectCompliance(targetDir: string = "src"): ComplianceIssu
130
120
  }
131
121
  }
132
122
  }
133
-
134
123
  ts.forEachChild(node, visit);
135
124
  };
136
-
137
125
  visit(sourceFile);
138
-
139
126
  // --- 2. Pattern-Based Analysis (For Secrets & PII & Debt) ---
140
127
  const lines = content.split("\n");
141
128
  const piiKeywords = [
@@ -145,13 +132,11 @@ export function scanProjectCompliance(targetDir: string = "src"): ComplianceIssu
145
132
  { regex: /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/, msg: "PII Detected: Email Address" },
146
133
  { regex: /\b\d{4}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}\b/, msg: "PII Detected: Credit Card Pattern" }
147
134
  ];
148
-
149
135
  lines.forEach((line, index) => {
150
136
  const lineNum = index + 1;
151
137
  const trimmedLine = line.trim();
152
-
153
- if (trimmedLine.startsWith("//") || trimmedLine.startsWith("*")) return;
154
-
138
+ if (trimmedLine.startsWith("//") || trimmedLine.startsWith("*"))
139
+ return;
155
140
  // PII & Secret Guard
156
141
  for (const { regex, msg } of piiKeywords) {
157
142
  if (regex.test(line)) {
@@ -162,7 +147,6 @@ export function scanProjectCompliance(targetDir: string = "src"): ComplianceIssu
162
147
  issues.push({ file, line: lineNum, rule: `Corporate Compliance Breach: ${msg}` });
163
148
  }
164
149
  }
165
-
166
150
  // Technical Debt (TODO/FIXME)
167
151
  if (/\b(TODO|FIXME)\b/i.test(line)) {
168
152
  issues.push({ file, line: lineNum, rule: "Unresolved Technical Debt (TODO/FIXME) found" });
@@ -171,21 +155,19 @@ export function scanProjectCompliance(targetDir: string = "src"): ComplianceIssu
171
155
  }
172
156
  return issues;
173
157
  }
174
-
175
- function getAllFiles(dirPath: string, arrayOfFiles: string[] = []): string[] {
158
+ function getAllFiles(dirPath, arrayOfFiles = []) {
176
159
  const files = fs.readdirSync(dirPath);
177
-
178
160
  files.forEach((file) => {
179
161
  const fullPath = path.join(dirPath, file);
180
162
  if (fs.statSync(fullPath).isDirectory()) {
181
163
  arrayOfFiles = getAllFiles(fullPath, arrayOfFiles);
182
- } else {
164
+ }
165
+ else {
183
166
  const ext = path.extname(fullPath);
184
167
  if ([".ts", ".tsx", ".js", ".jsx"].includes(ext)) {
185
168
  arrayOfFiles.push(fullPath);
186
169
  }
187
170
  }
188
171
  });
189
-
190
172
  return arrayOfFiles;
191
173
  }