atabey 0.0.1

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 (558) hide show
  1. package/ATABEY.md +258 -0
  2. package/LICENSE +21 -0
  3. package/README.md +190 -0
  4. package/bin/cli.js +26 -0
  5. package/bin/validate-agent-army.js +145 -0
  6. package/dist/framework-mcp/src/constants.d.ts +47 -0
  7. package/dist/framework-mcp/src/constants.js +65 -0
  8. package/dist/framework-mcp/src/constants.js.map +1 -0
  9. package/dist/framework-mcp/src/index.d.ts +1 -0
  10. package/dist/framework-mcp/src/index.js +120 -0
  11. package/dist/framework-mcp/src/index.js.map +1 -0
  12. package/dist/framework-mcp/src/tools/control_plane/locking.d.ts +9 -0
  13. package/dist/framework-mcp/src/tools/control_plane/locking.js +83 -0
  14. package/dist/framework-mcp/src/tools/control_plane/locking.js.map +1 -0
  15. package/dist/framework-mcp/src/tools/control_plane/registry.d.ts +6 -0
  16. package/dist/framework-mcp/src/tools/control_plane/registry.js +35 -0
  17. package/dist/framework-mcp/src/tools/control_plane/registry.js.map +1 -0
  18. package/dist/framework-mcp/src/tools/definitions.d.ts +2 -0
  19. package/dist/framework-mcp/src/tools/definitions.js +291 -0
  20. package/dist/framework-mcp/src/tools/definitions.js.map +1 -0
  21. package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.d.ts +5 -0
  22. package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js +60 -0
  23. package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js.map +1 -0
  24. package/dist/framework-mcp/src/tools/file_system/patch_file.d.ts +2 -0
  25. package/dist/framework-mcp/src/tools/file_system/patch_file.js +26 -0
  26. package/dist/framework-mcp/src/tools/file_system/patch_file.js.map +1 -0
  27. package/dist/framework-mcp/src/tools/file_system/read_file.d.ts +2 -0
  28. package/dist/framework-mcp/src/tools/file_system/read_file.js +52 -0
  29. package/dist/framework-mcp/src/tools/file_system/read_file.js.map +1 -0
  30. package/dist/framework-mcp/src/tools/file_system/replace_text.d.ts +2 -0
  31. package/dist/framework-mcp/src/tools/file_system/replace_text.js +46 -0
  32. package/dist/framework-mcp/src/tools/file_system/replace_text.js.map +1 -0
  33. package/dist/framework-mcp/src/tools/file_system/write_file.d.ts +2 -0
  34. package/dist/framework-mcp/src/tools/file_system/write_file.js +39 -0
  35. package/dist/framework-mcp/src/tools/file_system/write_file.js.map +1 -0
  36. package/dist/framework-mcp/src/tools/framework/audit_deps.d.ts +6 -0
  37. package/dist/framework-mcp/src/tools/framework/audit_deps.js +42 -0
  38. package/dist/framework-mcp/src/tools/framework/audit_deps.js.map +1 -0
  39. package/dist/framework-mcp/src/tools/framework/get_status.d.ts +2 -0
  40. package/dist/framework-mcp/src/tools/framework/get_status.js +6 -0
  41. package/dist/framework-mcp/src/tools/framework/get_status.js.map +1 -0
  42. package/dist/framework-mcp/src/tools/framework/orchestrate.d.ts +2 -0
  43. package/dist/framework-mcp/src/tools/framework/orchestrate.js +6 -0
  44. package/dist/framework-mcp/src/tools/framework/orchestrate.js.map +1 -0
  45. package/dist/framework-mcp/src/tools/framework/run_tests.d.ts +5 -0
  46. package/dist/framework-mcp/src/tools/framework/run_tests.js +26 -0
  47. package/dist/framework-mcp/src/tools/framework/run_tests.js.map +1 -0
  48. package/dist/framework-mcp/src/tools/framework/update_contract_hash.d.ts +2 -0
  49. package/dist/framework-mcp/src/tools/framework/update_contract_hash.js +6 -0
  50. package/dist/framework-mcp/src/tools/framework/update_contract_hash.js.map +1 -0
  51. package/dist/framework-mcp/src/tools/framework/update_memory.d.ts +2 -0
  52. package/dist/framework-mcp/src/tools/framework/update_memory.js +9 -0
  53. package/dist/framework-mcp/src/tools/framework/update_memory.js.map +1 -0
  54. package/dist/framework-mcp/src/tools/index.d.ts +4 -0
  55. package/dist/framework-mcp/src/tools/index.js +61 -0
  56. package/dist/framework-mcp/src/tools/index.js.map +1 -0
  57. package/dist/framework-mcp/src/tools/memory/get_insights.d.ts +6 -0
  58. package/dist/framework-mcp/src/tools/memory/get_insights.js +35 -0
  59. package/dist/framework-mcp/src/tools/memory/get_insights.js.map +1 -0
  60. package/dist/framework-mcp/src/tools/memory/read_memory.d.ts +6 -0
  61. package/dist/framework-mcp/src/tools/memory/read_memory.js +29 -0
  62. package/dist/framework-mcp/src/tools/memory/read_memory.js.map +1 -0
  63. package/dist/framework-mcp/src/tools/messaging/log_action.d.ts +2 -0
  64. package/dist/framework-mcp/src/tools/messaging/log_action.js +23 -0
  65. package/dist/framework-mcp/src/tools/messaging/log_action.js.map +1 -0
  66. package/dist/framework-mcp/src/tools/messaging/send_message.d.ts +2 -0
  67. package/dist/framework-mcp/src/tools/messaging/send_message.js +95 -0
  68. package/dist/framework-mcp/src/tools/messaging/send_message.js.map +1 -0
  69. package/dist/framework-mcp/src/tools/observability/check_ports.d.ts +5 -0
  70. package/dist/framework-mcp/src/tools/observability/check_ports.js +27 -0
  71. package/dist/framework-mcp/src/tools/observability/check_ports.js.map +1 -0
  72. package/dist/framework-mcp/src/tools/observability/get_health.d.ts +5 -0
  73. package/dist/framework-mcp/src/tools/observability/get_health.js +20 -0
  74. package/dist/framework-mcp/src/tools/observability/get_health.js.map +1 -0
  75. package/dist/framework-mcp/src/tools/quality/check_lint.d.ts +5 -0
  76. package/dist/framework-mcp/src/tools/quality/check_lint.js +29 -0
  77. package/dist/framework-mcp/src/tools/quality/check_lint.js.map +1 -0
  78. package/dist/framework-mcp/src/tools/search/get_gaps.d.ts +6 -0
  79. package/dist/framework-mcp/src/tools/search/get_gaps.js +49 -0
  80. package/dist/framework-mcp/src/tools/search/get_gaps.js.map +1 -0
  81. package/dist/framework-mcp/src/tools/search/get_map.d.ts +6 -0
  82. package/dist/framework-mcp/src/tools/search/get_map.js +44 -0
  83. package/dist/framework-mcp/src/tools/search/get_map.js.map +1 -0
  84. package/dist/framework-mcp/src/tools/search/grep_search.d.ts +5 -0
  85. package/dist/framework-mcp/src/tools/search/grep_search.js +76 -0
  86. package/dist/framework-mcp/src/tools/search/grep_search.js.map +1 -0
  87. package/dist/framework-mcp/src/tools/search/list_dir.d.ts +5 -0
  88. package/dist/framework-mcp/src/tools/search/list_dir.js +29 -0
  89. package/dist/framework-mcp/src/tools/search/list_dir.js.map +1 -0
  90. package/dist/framework-mcp/src/tools/shell/run_command.d.ts +2 -0
  91. package/dist/framework-mcp/src/tools/shell/run_command.js +47 -0
  92. package/dist/framework-mcp/src/tools/shell/run_command.js.map +1 -0
  93. package/dist/framework-mcp/src/tools/types.d.ts +120 -0
  94. package/dist/framework-mcp/src/tools/types.js +2 -0
  95. package/dist/framework-mcp/src/tools/types.js.map +1 -0
  96. package/dist/framework-mcp/src/utils/cli.d.ts +5 -0
  97. package/dist/framework-mcp/src/utils/cli.js +21 -0
  98. package/dist/framework-mcp/src/utils/cli.js.map +1 -0
  99. package/dist/framework-mcp/src/utils/compliance.d.ts +5 -0
  100. package/dist/framework-mcp/src/utils/compliance.js +79 -0
  101. package/dist/framework-mcp/src/utils/compliance.js.map +1 -0
  102. package/dist/framework-mcp/src/utils/fs.d.ts +16 -0
  103. package/dist/framework-mcp/src/utils/fs.js +45 -0
  104. package/dist/framework-mcp/src/utils/fs.js.map +1 -0
  105. package/dist/framework-mcp/src/utils/metrics.d.ts +30 -0
  106. package/dist/framework-mcp/src/utils/metrics.js +57 -0
  107. package/dist/framework-mcp/src/utils/metrics.js.map +1 -0
  108. package/dist/framework-mcp/src/utils/security.d.ts +10 -0
  109. package/dist/framework-mcp/src/utils/security.js +61 -0
  110. package/dist/framework-mcp/src/utils/security.js.map +1 -0
  111. package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.d.ts +1 -0
  112. package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js +192 -0
  113. package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js.map +1 -0
  114. package/dist/framework-mcp/tests/tools/messaging/send_message.test.d.ts +1 -0
  115. package/dist/framework-mcp/tests/tools/messaging/send_message.test.js +115 -0
  116. package/dist/framework-mcp/tests/tools/messaging/send_message.test.js.map +1 -0
  117. package/dist/framework-mcp/tests/tools/quality/check_lint.test.d.ts +1 -0
  118. package/dist/framework-mcp/tests/tools/quality/check_lint.test.js +36 -0
  119. package/dist/framework-mcp/tests/tools/quality/check_lint.test.js.map +1 -0
  120. package/dist/framework-mcp/tests/tools/shell/run_command.test.d.ts +1 -0
  121. package/dist/framework-mcp/tests/tools/shell/run_command.test.js +43 -0
  122. package/dist/framework-mcp/tests/tools/shell/run_command.test.js.map +1 -0
  123. package/dist/src/cli/adapters/core.d.ts +12 -0
  124. package/dist/src/cli/adapters/core.js +55 -0
  125. package/dist/src/cli/adapters/core.js.map +1 -0
  126. package/dist/src/cli/adapters/index.d.ts +5 -0
  127. package/dist/src/cli/adapters/index.js +6 -0
  128. package/dist/src/cli/adapters/index.js.map +1 -0
  129. package/dist/src/cli/adapters/paths.d.ts +15 -0
  130. package/dist/src/cli/adapters/paths.js +102 -0
  131. package/dist/src/cli/adapters/paths.js.map +1 -0
  132. package/dist/src/cli/adapters/scaffold.d.ts +2 -0
  133. package/dist/src/cli/adapters/scaffold.js +72 -0
  134. package/dist/src/cli/adapters/scaffold.js.map +1 -0
  135. package/dist/src/cli/adapters/utils.d.ts +4 -0
  136. package/dist/src/cli/adapters/utils.js +76 -0
  137. package/dist/src/cli/adapters/utils.js.map +1 -0
  138. package/dist/src/cli/commands/approve.d.ts +1 -0
  139. package/dist/src/cli/commands/approve.js +64 -0
  140. package/dist/src/cli/commands/approve.js.map +1 -0
  141. package/dist/src/cli/commands/check.d.ts +1 -0
  142. package/dist/src/cli/commands/check.js +180 -0
  143. package/dist/src/cli/commands/check.js.map +1 -0
  144. package/dist/src/cli/commands/compliance.d.ts +1 -0
  145. package/dist/src/cli/commands/compliance.js +51 -0
  146. package/dist/src/cli/commands/compliance.js.map +1 -0
  147. package/dist/src/cli/commands/contract.d.ts +10 -0
  148. package/dist/src/cli/commands/contract.js +51 -0
  149. package/dist/src/cli/commands/contract.js.map +1 -0
  150. package/dist/src/cli/commands/explorer.d.ts +2 -0
  151. package/dist/src/cli/commands/explorer.js +43 -0
  152. package/dist/src/cli/commands/explorer.js.map +1 -0
  153. package/dist/src/cli/commands/git.d.ts +2 -0
  154. package/dist/src/cli/commands/git.js +41 -0
  155. package/dist/src/cli/commands/git.js.map +1 -0
  156. package/dist/src/cli/commands/init/scaffold-core.d.ts +7 -0
  157. package/dist/src/cli/commands/init/scaffold-core.js +102 -0
  158. package/dist/src/cli/commands/init/scaffold-core.js.map +1 -0
  159. package/dist/src/cli/commands/init/scaffold-ops.d.ts +1 -0
  160. package/dist/src/cli/commands/init/scaffold-ops.js +81 -0
  161. package/dist/src/cli/commands/init/scaffold-ops.js.map +1 -0
  162. package/dist/src/cli/commands/init/scaffold-standards.d.ts +2 -0
  163. package/dist/src/cli/commands/init/scaffold-standards.js +66 -0
  164. package/dist/src/cli/commands/init/scaffold-standards.js.map +1 -0
  165. package/dist/src/cli/commands/init.d.ts +5 -0
  166. package/dist/src/cli/commands/init.js +128 -0
  167. package/dist/src/cli/commands/init.js.map +1 -0
  168. package/dist/src/cli/commands/knowledge.d.ts +2 -0
  169. package/dist/src/cli/commands/knowledge.js +43 -0
  170. package/dist/src/cli/commands/knowledge.js.map +1 -0
  171. package/dist/src/cli/commands/lint.d.ts +4 -0
  172. package/dist/src/cli/commands/lint.js +23 -0
  173. package/dist/src/cli/commands/lint.js.map +1 -0
  174. package/dist/src/cli/commands/log.d.ts +10 -0
  175. package/dist/src/cli/commands/log.js +33 -0
  176. package/dist/src/cli/commands/log.js.map +1 -0
  177. package/dist/src/cli/commands/memory.d.ts +1 -0
  178. package/dist/src/cli/commands/memory.js +5 -0
  179. package/dist/src/cli/commands/memory.js.map +1 -0
  180. package/dist/src/cli/commands/orchestrate.d.ts +67 -0
  181. package/dist/src/cli/commands/orchestrate.js +414 -0
  182. package/dist/src/cli/commands/orchestrate.js.map +1 -0
  183. package/dist/src/cli/commands/plan.d.ts +6 -0
  184. package/dist/src/cli/commands/plan.js +97 -0
  185. package/dist/src/cli/commands/plan.js.map +1 -0
  186. package/dist/src/cli/commands/script.d.ts +1 -0
  187. package/dist/src/cli/commands/script.js +20 -0
  188. package/dist/src/cli/commands/script.js.map +1 -0
  189. package/dist/src/cli/commands/security.d.ts +1 -0
  190. package/dist/src/cli/commands/security.js +37 -0
  191. package/dist/src/cli/commands/security.js.map +1 -0
  192. package/dist/src/cli/commands/status.d.ts +4 -0
  193. package/dist/src/cli/commands/status.js +41 -0
  194. package/dist/src/cli/commands/status.js.map +1 -0
  195. package/dist/src/cli/commands/trace.d.ts +4 -0
  196. package/dist/src/cli/commands/trace.js +29 -0
  197. package/dist/src/cli/commands/trace.js.map +1 -0
  198. package/dist/src/cli/index.d.ts +2 -0
  199. package/dist/src/cli/index.js +289 -0
  200. package/dist/src/cli/index.js.map +1 -0
  201. package/dist/src/cli/shims.d.ts +1 -0
  202. package/dist/src/cli/shims.js +67 -0
  203. package/dist/src/cli/shims.js.map +1 -0
  204. package/dist/src/cli/utils/claude.d.ts +8 -0
  205. package/dist/src/cli/utils/claude.js +57 -0
  206. package/dist/src/cli/utils/claude.js.map +1 -0
  207. package/dist/src/cli/utils/compliance.d.ts +11 -0
  208. package/dist/src/cli/utils/compliance.js +168 -0
  209. package/dist/src/cli/utils/compliance.js.map +1 -0
  210. package/dist/src/cli/utils/config-schema.d.ts +139 -0
  211. package/dist/src/cli/utils/config-schema.js +43 -0
  212. package/dist/src/cli/utils/config-schema.js.map +1 -0
  213. package/dist/src/cli/utils/fs.d.ts +10 -0
  214. package/dist/src/cli/utils/fs.js +138 -0
  215. package/dist/src/cli/utils/fs.js.map +1 -0
  216. package/dist/src/cli/utils/memory.d.ts +30 -0
  217. package/dist/src/cli/utils/memory.js +269 -0
  218. package/dist/src/cli/utils/memory.js.map +1 -0
  219. package/dist/src/cli/utils/pkg.d.ts +43 -0
  220. package/dist/src/cli/utils/pkg.js +283 -0
  221. package/dist/src/cli/utils/pkg.js.map +1 -0
  222. package/dist/src/cli/utils/schemas.d.ts +49 -0
  223. package/dist/src/cli/utils/schemas.js +20 -0
  224. package/dist/src/cli/utils/schemas.js.map +1 -0
  225. package/dist/src/cli/utils/string.d.ts +7 -0
  226. package/dist/src/cli/utils/string.js +50 -0
  227. package/dist/src/cli/utils/string.js.map +1 -0
  228. package/dist/src/cli/utils/time.d.ts +2 -0
  229. package/dist/src/cli/utils/time.js +28 -0
  230. package/dist/src/cli/utils/time.js.map +1 -0
  231. package/dist/src/cli/utils/ui.d.ts +30 -0
  232. package/dist/src/cli/utils/ui.js +59 -0
  233. package/dist/src/cli/utils/ui.js.map +1 -0
  234. package/dist/src/contracts/index.d.ts +1 -0
  235. package/dist/src/contracts/index.js +2 -0
  236. package/dist/src/contracts/index.js.map +1 -0
  237. package/dist/src/contracts/tasks.d.ts +44 -0
  238. package/dist/src/contracts/tasks.js +21 -0
  239. package/dist/src/contracts/tasks.js.map +1 -0
  240. package/dist/src/modules/adapters/definitions.d.ts +9 -0
  241. package/dist/src/modules/adapters/definitions.js +141 -0
  242. package/dist/src/modules/adapters/definitions.js.map +1 -0
  243. package/dist/src/modules/adapters/registry.d.ts +12 -0
  244. package/dist/src/modules/adapters/registry.js +19 -0
  245. package/dist/src/modules/adapters/registry.js.map +1 -0
  246. package/dist/src/modules/adapters/shared.d.ts +1 -0
  247. package/dist/src/modules/adapters/shared.js +105 -0
  248. package/dist/src/modules/adapters/shared.js.map +1 -0
  249. package/dist/src/modules/adapters/types.d.ts +14 -0
  250. package/dist/src/modules/adapters/types.js +2 -0
  251. package/dist/src/modules/adapters/types.js.map +1 -0
  252. package/dist/src/modules/agents/definitions.d.ts +15 -0
  253. package/dist/src/modules/agents/definitions.js +401 -0
  254. package/dist/src/modules/agents/definitions.js.map +1 -0
  255. package/dist/src/modules/agents/registry/analyst.d.ts +2 -0
  256. package/dist/src/modules/agents/registry/analyst.js +40 -0
  257. package/dist/src/modules/agents/registry/analyst.js.map +1 -0
  258. package/dist/src/modules/agents/registry/architect.d.ts +2 -0
  259. package/dist/src/modules/agents/registry/architect.js +43 -0
  260. package/dist/src/modules/agents/registry/architect.js.map +1 -0
  261. package/dist/src/modules/agents/registry/backend.d.ts +2 -0
  262. package/dist/src/modules/agents/registry/backend.js +43 -0
  263. package/dist/src/modules/agents/registry/backend.js.map +1 -0
  264. package/dist/src/modules/agents/registry/database.d.ts +2 -0
  265. package/dist/src/modules/agents/registry/database.js +39 -0
  266. package/dist/src/modules/agents/registry/database.js.map +1 -0
  267. package/dist/src/modules/agents/registry/devops.d.ts +2 -0
  268. package/dist/src/modules/agents/registry/devops.js +40 -0
  269. package/dist/src/modules/agents/registry/devops.js.map +1 -0
  270. package/dist/src/modules/agents/registry/explorer.d.ts +2 -0
  271. package/dist/src/modules/agents/registry/explorer.js +37 -0
  272. package/dist/src/modules/agents/registry/explorer.js.map +1 -0
  273. package/dist/src/modules/agents/registry/frontend.d.ts +2 -0
  274. package/dist/src/modules/agents/registry/frontend.js +44 -0
  275. package/dist/src/modules/agents/registry/frontend.js.map +1 -0
  276. package/dist/src/modules/agents/registry/git.d.ts +2 -0
  277. package/dist/src/modules/agents/registry/git.js +37 -0
  278. package/dist/src/modules/agents/registry/git.js.map +1 -0
  279. package/dist/src/modules/agents/registry/manager.d.ts +2 -0
  280. package/dist/src/modules/agents/registry/manager.js +54 -0
  281. package/dist/src/modules/agents/registry/manager.js.map +1 -0
  282. package/dist/src/modules/agents/registry/mobile.d.ts +2 -0
  283. package/dist/src/modules/agents/registry/mobile.js +40 -0
  284. package/dist/src/modules/agents/registry/mobile.js.map +1 -0
  285. package/dist/src/modules/agents/registry/native.d.ts +2 -0
  286. package/dist/src/modules/agents/registry/native.js +40 -0
  287. package/dist/src/modules/agents/registry/native.js.map +1 -0
  288. package/dist/src/modules/agents/registry/quality.d.ts +2 -0
  289. package/dist/src/modules/agents/registry/quality.js +42 -0
  290. package/dist/src/modules/agents/registry/quality.js.map +1 -0
  291. package/dist/src/modules/agents/registry/security.d.ts +2 -0
  292. package/dist/src/modules/agents/registry/security.js +38 -0
  293. package/dist/src/modules/agents/registry/security.js.map +1 -0
  294. package/dist/src/modules/agents/types.d.ts +31 -0
  295. package/dist/src/modules/agents/types.js +2 -0
  296. package/dist/src/modules/agents/types.js.map +1 -0
  297. package/dist/src/modules/skills/definitions.d.ts +48 -0
  298. package/dist/src/modules/skills/definitions.js +71 -0
  299. package/dist/src/modules/skills/definitions.js.map +1 -0
  300. package/dist/src/shared/constants.d.ts +116 -0
  301. package/dist/src/shared/constants.js +184 -0
  302. package/dist/src/shared/constants.js.map +1 -0
  303. package/dist/src/shared/errors.d.ts +46 -0
  304. package/dist/src/shared/errors.js +69 -0
  305. package/dist/src/shared/errors.js.map +1 -0
  306. package/dist/src/shared/fs.d.ts +8 -0
  307. package/dist/src/shared/fs.js +48 -0
  308. package/dist/src/shared/fs.js.map +1 -0
  309. package/dist/src/shared/logger.d.ts +28 -0
  310. package/dist/src/shared/logger.js +117 -0
  311. package/dist/src/shared/logger.js.map +1 -0
  312. package/dist/src/shared/types.d.ts +19 -0
  313. package/dist/src/shared/types.js +13 -0
  314. package/dist/src/shared/types.js.map +1 -0
  315. package/dist/tests/adapter.test.d.ts +1 -0
  316. package/dist/tests/adapter.test.js +128 -0
  317. package/dist/tests/adapter.test.js.map +1 -0
  318. package/dist/tests/adapters/paths.test.d.ts +1 -0
  319. package/dist/tests/adapters/paths.test.js +63 -0
  320. package/dist/tests/adapters/paths.test.js.map +1 -0
  321. package/dist/tests/agents-definitions.test.d.ts +1 -0
  322. package/dist/tests/agents-definitions.test.js +61 -0
  323. package/dist/tests/agents-definitions.test.js.map +1 -0
  324. package/dist/tests/approve.test.d.ts +1 -0
  325. package/dist/tests/approve.test.js +52 -0
  326. package/dist/tests/approve.test.js.map +1 -0
  327. package/dist/tests/cli/init/adapter_init.test.d.ts +1 -0
  328. package/dist/tests/cli/init/adapter_init.test.js +50 -0
  329. package/dist/tests/cli/init/adapter_init.test.js.map +1 -0
  330. package/dist/tests/cli/init/unified_init.test.d.ts +1 -0
  331. package/dist/tests/cli/init/unified_init.test.js +58 -0
  332. package/dist/tests/cli/init/unified_init.test.js.map +1 -0
  333. package/dist/tests/errors.test.d.ts +1 -0
  334. package/dist/tests/errors.test.js +64 -0
  335. package/dist/tests/errors.test.js.map +1 -0
  336. package/dist/tests/fs-utils.test.d.ts +1 -0
  337. package/dist/tests/fs-utils.test.js +101 -0
  338. package/dist/tests/fs-utils.test.js.map +1 -0
  339. package/dist/tests/integration/agent_flow.test.d.ts +1 -0
  340. package/dist/tests/integration/agent_flow.test.js +55 -0
  341. package/dist/tests/integration/agent_flow.test.js.map +1 -0
  342. package/dist/tests/integration/hermes_locking.test.d.ts +1 -0
  343. package/dist/tests/integration/hermes_locking.test.js +64 -0
  344. package/dist/tests/integration/hermes_locking.test.js.map +1 -0
  345. package/dist/tests/logger.test.d.ts +1 -0
  346. package/dist/tests/logger.test.js +81 -0
  347. package/dist/tests/logger.test.js.map +1 -0
  348. package/dist/tests/memory-utils.test.d.ts +1 -0
  349. package/dist/tests/memory-utils.test.js +59 -0
  350. package/dist/tests/memory-utils.test.js.map +1 -0
  351. package/dist/tests/modules/adapters/adapters.test.d.ts +1 -0
  352. package/dist/tests/modules/adapters/adapters.test.js +30 -0
  353. package/dist/tests/modules/adapters/adapters.test.js.map +1 -0
  354. package/dist/tests/orchestrate.test.d.ts +1 -0
  355. package/dist/tests/orchestrate.test.js +67 -0
  356. package/dist/tests/orchestrate.test.js.map +1 -0
  357. package/dist/tests/shared/constants.test.d.ts +1 -0
  358. package/dist/tests/shared/constants.test.js +17 -0
  359. package/dist/tests/shared/constants.test.js.map +1 -0
  360. package/dist/tests/skills-definitions.test.d.ts +1 -0
  361. package/dist/tests/skills-definitions.test.js +34 -0
  362. package/dist/tests/skills-definitions.test.js.map +1 -0
  363. package/dist/tests/status.test.d.ts +1 -0
  364. package/dist/tests/status.test.js +49 -0
  365. package/dist/tests/status.test.js.map +1 -0
  366. package/dist/tests/string.test.d.ts +1 -0
  367. package/dist/tests/string.test.js +89 -0
  368. package/dist/tests/string.test.js.map +1 -0
  369. package/dist/tests/time.test.d.ts +1 -0
  370. package/dist/tests/time.test.js +48 -0
  371. package/dist/tests/time.test.js.map +1 -0
  372. package/dist/tests/trace.test.d.ts +1 -0
  373. package/dist/tests/trace.test.js +28 -0
  374. package/dist/tests/trace.test.js.map +1 -0
  375. package/dist/vitest.config.d.ts +2 -0
  376. package/dist/vitest.config.js +20 -0
  377. package/dist/vitest.config.js.map +1 -0
  378. package/framework-mcp/dist/constants.js +64 -0
  379. package/framework-mcp/dist/index.js +119 -0
  380. package/framework-mcp/dist/tools/control_plane/locking.js +82 -0
  381. package/framework-mcp/dist/tools/control_plane/registry.js +34 -0
  382. package/framework-mcp/dist/tools/definitions.js +290 -0
  383. package/framework-mcp/dist/tools/file_system/batch_surgical_edit.js +59 -0
  384. package/framework-mcp/dist/tools/file_system/patch_file.js +25 -0
  385. package/framework-mcp/dist/tools/file_system/read_file.js +51 -0
  386. package/framework-mcp/dist/tools/file_system/replace_text.js +45 -0
  387. package/framework-mcp/dist/tools/file_system/write_file.js +38 -0
  388. package/framework-mcp/dist/tools/framework/audit_deps.js +41 -0
  389. package/framework-mcp/dist/tools/framework/get_status.js +5 -0
  390. package/framework-mcp/dist/tools/framework/orchestrate.js +5 -0
  391. package/framework-mcp/dist/tools/framework/run_tests.js +25 -0
  392. package/framework-mcp/dist/tools/framework/update_contract_hash.js +5 -0
  393. package/framework-mcp/dist/tools/framework/update_memory.js +8 -0
  394. package/framework-mcp/dist/tools/index.js +60 -0
  395. package/framework-mcp/dist/tools/memory/get_insights.js +34 -0
  396. package/framework-mcp/dist/tools/memory/read_memory.js +28 -0
  397. package/framework-mcp/dist/tools/messaging/log_action.js +22 -0
  398. package/framework-mcp/dist/tools/messaging/send_message.js +94 -0
  399. package/framework-mcp/dist/tools/observability/check_ports.js +26 -0
  400. package/framework-mcp/dist/tools/observability/get_health.js +19 -0
  401. package/framework-mcp/dist/tools/quality/check_lint.js +28 -0
  402. package/framework-mcp/dist/tools/search/get_gaps.js +48 -0
  403. package/framework-mcp/dist/tools/search/get_map.js +43 -0
  404. package/framework-mcp/dist/tools/search/grep_search.js +75 -0
  405. package/framework-mcp/dist/tools/search/list_dir.js +28 -0
  406. package/framework-mcp/dist/tools/shell/run_command.js +46 -0
  407. package/framework-mcp/dist/tools/types.js +1 -0
  408. package/framework-mcp/dist/utils/cli.js +20 -0
  409. package/framework-mcp/dist/utils/compliance.js +78 -0
  410. package/framework-mcp/dist/utils/fs.js +44 -0
  411. package/framework-mcp/dist/utils/metrics.js +56 -0
  412. package/framework-mcp/dist/utils/security.js +60 -0
  413. package/framework-mcp/package-lock.json +1191 -0
  414. package/framework-mcp/package.json +26 -0
  415. package/framework-mcp/src/constants.ts +78 -0
  416. package/framework-mcp/src/declarations.d.ts +17 -0
  417. package/framework-mcp/src/index.ts +144 -0
  418. package/framework-mcp/src/tools/control_plane/locking.ts +89 -0
  419. package/framework-mcp/src/tools/control_plane/registry.ts +38 -0
  420. package/framework-mcp/src/tools/definitions.ts +292 -0
  421. package/framework-mcp/src/tools/file_system/batch_surgical_edit.ts +79 -0
  422. package/framework-mcp/src/tools/file_system/patch_file.ts +33 -0
  423. package/framework-mcp/src/tools/file_system/read_file.ts +58 -0
  424. package/framework-mcp/src/tools/file_system/replace_text.ts +54 -0
  425. package/framework-mcp/src/tools/file_system/write_file.ts +45 -0
  426. package/framework-mcp/src/tools/framework/audit_deps.ts +49 -0
  427. package/framework-mcp/src/tools/framework/get_status.ts +7 -0
  428. package/framework-mcp/src/tools/framework/orchestrate.ts +7 -0
  429. package/framework-mcp/src/tools/framework/run_tests.ts +28 -0
  430. package/framework-mcp/src/tools/framework/update_contract_hash.ts +7 -0
  431. package/framework-mcp/src/tools/framework/update_memory.ts +10 -0
  432. package/framework-mcp/src/tools/index.ts +64 -0
  433. package/framework-mcp/src/tools/memory/get_insights.ts +41 -0
  434. package/framework-mcp/src/tools/memory/read_memory.ts +31 -0
  435. package/framework-mcp/src/tools/messaging/log_action.ts +28 -0
  436. package/framework-mcp/src/tools/messaging/send_message.ts +97 -0
  437. package/framework-mcp/src/tools/observability/check_ports.ts +30 -0
  438. package/framework-mcp/src/tools/observability/get_health.ts +24 -0
  439. package/framework-mcp/src/tools/quality/check_lint.ts +33 -0
  440. package/framework-mcp/src/tools/search/get_gaps.ts +54 -0
  441. package/framework-mcp/src/tools/search/get_map.ts +48 -0
  442. package/framework-mcp/src/tools/search/grep_search.ts +75 -0
  443. package/framework-mcp/src/tools/search/list_dir.ts +34 -0
  444. package/framework-mcp/src/tools/shell/run_command.ts +56 -0
  445. package/framework-mcp/src/tools/types.ts +89 -0
  446. package/framework-mcp/src/utils/cli.ts +20 -0
  447. package/framework-mcp/src/utils/compliance.ts +95 -0
  448. package/framework-mcp/src/utils/fs.ts +45 -0
  449. package/framework-mcp/src/utils/metrics.ts +73 -0
  450. package/framework-mcp/src/utils/security.ts +66 -0
  451. package/framework-mcp/tests/tools/file_system/file_system_tools.test.ts +212 -0
  452. package/framework-mcp/tests/tools/messaging/send_message.test.ts +136 -0
  453. package/framework-mcp/tests/tools/quality/check_lint.test.ts +46 -0
  454. package/framework-mcp/tests/tools/shell/run_command.test.ts +55 -0
  455. package/framework-mcp/tsconfig.json +14 -0
  456. package/mcp.json +13 -0
  457. package/package.json +89 -0
  458. package/src/cli/adapters/core.ts +67 -0
  459. package/src/cli/adapters/index.ts +5 -0
  460. package/src/cli/adapters/paths.ts +135 -0
  461. package/src/cli/adapters/scaffold.ts +93 -0
  462. package/src/cli/adapters/utils.ts +87 -0
  463. package/src/cli/commands/approve.ts +73 -0
  464. package/src/cli/commands/check.ts +188 -0
  465. package/src/cli/commands/compliance.ts +55 -0
  466. package/src/cli/commands/contract.ts +68 -0
  467. package/src/cli/commands/explorer.ts +45 -0
  468. package/src/cli/commands/git.ts +39 -0
  469. package/src/cli/commands/init/scaffold-core.ts +128 -0
  470. package/src/cli/commands/init/scaffold-ops.ts +83 -0
  471. package/src/cli/commands/init/scaffold-standards.ts +67 -0
  472. package/src/cli/commands/init.ts +163 -0
  473. package/src/cli/commands/knowledge.ts +44 -0
  474. package/src/cli/commands/lint.ts +23 -0
  475. package/src/cli/commands/log.ts +37 -0
  476. package/src/cli/commands/memory.ts +6 -0
  477. package/src/cli/commands/orchestrate.ts +456 -0
  478. package/src/cli/commands/plan.ts +113 -0
  479. package/src/cli/commands/script.ts +20 -0
  480. package/src/cli/commands/security.ts +38 -0
  481. package/src/cli/commands/status.ts +44 -0
  482. package/src/cli/commands/trace.ts +31 -0
  483. package/src/cli/index.ts +322 -0
  484. package/src/cli/shims.ts +66 -0
  485. package/src/cli/utils/claude.ts +63 -0
  486. package/src/cli/utils/compliance.ts +191 -0
  487. package/src/cli/utils/config-schema.ts +48 -0
  488. package/src/cli/utils/fs.ts +170 -0
  489. package/src/cli/utils/memory.ts +303 -0
  490. package/src/cli/utils/pkg.ts +317 -0
  491. package/src/cli/utils/schemas.ts +22 -0
  492. package/src/cli/utils/string.ts +55 -0
  493. package/src/cli/utils/time.ts +27 -0
  494. package/src/cli/utils/ui.ts +66 -0
  495. package/src/contracts/index.ts +1 -0
  496. package/src/contracts/tasks.ts +26 -0
  497. package/src/modules/adapters/definitions.ts +171 -0
  498. package/src/modules/adapters/registry.ts +27 -0
  499. package/src/modules/adapters/shared.ts +120 -0
  500. package/src/modules/adapters/types.ts +16 -0
  501. package/src/modules/agents/definitions.ts +454 -0
  502. package/src/modules/agents/registry/analyst.ts +44 -0
  503. package/src/modules/agents/registry/architect.ts +47 -0
  504. package/src/modules/agents/registry/backend.ts +47 -0
  505. package/src/modules/agents/registry/database.ts +43 -0
  506. package/src/modules/agents/registry/devops.ts +44 -0
  507. package/src/modules/agents/registry/explorer.ts +41 -0
  508. package/src/modules/agents/registry/frontend.ts +48 -0
  509. package/src/modules/agents/registry/git.ts +41 -0
  510. package/src/modules/agents/registry/manager.ts +58 -0
  511. package/src/modules/agents/registry/mobile.ts +44 -0
  512. package/src/modules/agents/registry/native.ts +44 -0
  513. package/src/modules/agents/registry/quality.ts +46 -0
  514. package/src/modules/agents/registry/security.ts +42 -0
  515. package/src/modules/agents/types.ts +37 -0
  516. package/src/modules/skills/definitions.ts +71 -0
  517. package/src/schema/agent-lifecycle-schema.json +59 -0
  518. package/src/shared/constants.ts +218 -0
  519. package/src/shared/errors.ts +75 -0
  520. package/src/shared/fs.ts +50 -0
  521. package/src/shared/logger.ts +139 -0
  522. package/src/shared/types.ts +20 -0
  523. package/templates/prompts/bug-fix-recipe.md +20 -0
  524. package/templates/prompts/contract-design-recipe.md +21 -0
  525. package/templates/prompts/db-management-recipe.md +25 -0
  526. package/templates/prompts/deployment-recipe.md +23 -0
  527. package/templates/prompts/new-feature-recipe.md +19 -0
  528. package/templates/prompts/performance-optimization-recipe.md +23 -0
  529. package/templates/prompts/pull-request-template.md +21 -0
  530. package/templates/prompts/refactoring-recipe.md +21 -0
  531. package/templates/prompts/security-audit-recipe.md +20 -0
  532. package/templates/standards/architecture-standards.md +23 -0
  533. package/templates/standards/auth-standards.md +125 -0
  534. package/templates/standards/crud-governance.md +21 -0
  535. package/templates/standards/deployment-standards.md +21 -0
  536. package/templates/standards/frontend-standards.md +42 -0
  537. package/templates/standards/github-actions-standards.md +43 -0
  538. package/templates/standards/governance-standards.md +147 -0
  539. package/templates/standards/i18n-standards.md +29 -0
  540. package/templates/standards/kysely-standards.md +47 -0
  541. package/templates/standards/llm-governance.md +29 -0
  542. package/templates/standards/logging-and-secrets.md +34 -0
  543. package/templates/standards/mobile-standards.md +23 -0
  544. package/templates/standards/observability-standards.md +29 -0
  545. package/templates/standards/performance-standards.md +29 -0
  546. package/templates/standards/pino-standards.md +46 -0
  547. package/templates/standards/playwright-standards.md +54 -0
  548. package/templates/standards/quality-standards.md +32 -0
  549. package/templates/standards/react-query-standards.md +72 -0
  550. package/templates/standards/react-router-standards.md +62 -0
  551. package/templates/standards/security-audit-standards.md +33 -0
  552. package/templates/standards/security-standards.md +21 -0
  553. package/templates/standards/swagger-standards.md +50 -0
  554. package/templates/standards/tailwind-standards.md +29 -0
  555. package/templates/standards/testing-standards.md +31 -0
  556. package/templates/standards/token-economy.md +27 -0
  557. package/templates/standards/typeorm-standards.md +49 -0
  558. package/templates/standards/vitest-standards.md +110 -0
@@ -0,0 +1,29 @@
1
+ # 📊 Observability and Monitoring Standards
2
+
3
+ This document defines the requirements for logging, tracing, metrics, and alerting within Atabey-managed projects, following the "three pillars" model (logs, metrics, traces).
4
+
5
+ ## 1. Traceability
6
+ - **Trace ID Enforcement:** Every single request, message, or task delegated between agents must include the active `Trace ID` in its metadata.
7
+ - **Context Logging:** Logs must be structured in JSON format where possible, containing at least: `timestamp`, `level`, `agentName`, `traceId`, `action`, and `message`.
8
+ - **Correlation Across Boundaries:** When a task spans backend, frontend, and database work, the same `Trace ID` must propagate end-to-end so a single workflow can be reconstructed.
9
+ - **Span Discipline (App Runtime):** Production services should emit OpenTelemetry-compatible spans for inbound requests, outbound calls, and DB queries, propagating `traceparent` headers.
10
+
11
+ ## 2. Audit Trail
12
+ - **High-Risk Actions:** All administrative or high-risk actions (e.g., DB changes, User role updates) must be recorded in `observability/audit_log.md` with a timestamp, actor agent, and outcome.
13
+ - **Immutable Logs:** Audit logs should be appended only and never modified or deleted.
14
+ - **Tamper Evidence:** Audit entries for compliance-sensitive actions should include the prior entry reference (chained) so deletions are detectable.
15
+
16
+ ## 3. Log Levels and Hygiene
17
+ - **Level Discipline:** `ERROR` = actionable failure; `WARN` = degraded but recovered; `INFO` = lifecycle events; `DEBUG` = development only, disabled in production by default.
18
+ - **No Secrets in Logs:** PII, tokens, and credentials must never be logged. Redact with a central sanitizer before emit.
19
+ - **Cardinality Control:** Do not log unbounded high-cardinality values (raw user input, full payloads) at `INFO`.
20
+
21
+ ## 4. Metrics (RED / USE)
22
+ - **RED for services:** Track Rate, Errors, and Duration for every endpoint.
23
+ - **USE for resources:** Track Utilization, Saturation, and Errors for CPU, memory, and connection pools.
24
+ - **SLOs:** Each critical service declares an SLO (e.g., 99.9% availability, p95 < 300ms) with an error budget that gates risky deploys.
25
+
26
+ ## 5. Monitoring and Alerting
27
+ - **Health Checks:** Agents must periodically invoke the `get_system_health` tool; services expose a `/health` (liveness) and `/ready` (readiness) endpoint.
28
+ - **Alerting:** Critical errors or timeouts must immediately trigger an `ALERT` message to the `@manager` agent for escalation.
29
+ - **Actionable Alerts Only:** Every alert must map to a documented runbook; symptom-based alerts (SLO burn) are preferred over noisy cause-based alerts.
@@ -0,0 +1,29 @@
1
+ # 📈 Performance Monitoring Standards
2
+
3
+ This document defines the metrics, budgets, and monitoring requirements to ensure the Atabey Army — and the applications it produces — operate at peak efficiency.
4
+
5
+ ## 1. Orchestration Core Metrics
6
+ - **Task Latency (Completion Time):** Time from task delegation (`PENDING`) to completion (`SUCCESS`) must be tracked per `Trace ID`. Target p95 < 1 orchestration loop cycle.
7
+ - **Token Consumption:** The total LLM tokens used per `Trace ID` must be logged and analyzed to identify inefficient prompts. Report any single task exceeding 2x its role budget.
8
+ - **Agent Error Rates:** The frequency of `FAILED` or `RETRY` statuses per agent must be monitored. A `@agent` exceeding a 15% retry rate over 20 tasks must be flagged for prompt review.
9
+ - **Lock Contention:** Track Hermes message-lock acquisition wait time. Sustained waits > 5s indicate orchestration contention.
10
+
11
+ ## 2. Telemetry Implementation
12
+ - **Standardized Logging:** Every task completion event must include the `Trace ID`, the duration (in milliseconds), and the tool/agent interaction summary.
13
+ - **Performance Budgeting:** Each agent role has an estimated token budget. Budget overflows must be reported by the `@analyst` agent.
14
+ - **Sampling:** High-frequency tool calls (search, read) may be sampled at 10% for telemetry to avoid log flooding, but every state-mutating action is logged at 100%.
15
+
16
+ ## 3. Bottleneck Identification
17
+ - **Critical Path Analysis:** Agents identified as bottlenecking the orchestration loop (frequent `WAITING` or `BLOCKED` states) must be reviewed for logic optimization.
18
+ - **Hotspot Reports:** `@analyst` produces a weekly hotspot summary identifying the top 3 slowest agents and the top 3 most token-expensive task types.
19
+
20
+ ## 4. Application Runtime Performance (Delivered Product)
21
+ The applications the army builds must also meet runtime budgets:
22
+ - **Web Vitals:** LCP < 2.5s, INP < 200ms, CLS < 0.1 on the 75th percentile of real users.
23
+ - **API Latency:** Server p95 response time < 300ms for read endpoints, < 800ms for write endpoints under nominal load.
24
+ - **Database:** No N+1 query patterns. Every list endpoint must be paginated; queries on non-indexed columns in hot paths are forbidden.
25
+ - **Bundle Budget:** Initial JS payload (gzipped) < 200KB for the critical route; enforce code-splitting for routes beyond the entry shell.
26
+ - **Caching:** Cacheable responses must declare explicit `Cache-Control`; server-side data fetching uses a documented TTL strategy.
27
+
28
+ ## 5. Regression Gate
29
+ - Performance budgets are enforced in CI. A change that regresses a tracked metric beyond its threshold blocks merge until `@manager` approves an explicit exception with a `Trace ID`.
@@ -0,0 +1,46 @@
1
+ # Logging Standards
2
+
3
+ > Structured logging with Pino for Node.js applications.
4
+
5
+ ## Overview
6
+
7
+ Pino is a fast, low-overhead structured logger. All logs must be in JSON format for production.
8
+
9
+ ## Setup
10
+
11
+ ```bash
12
+ npm install pino
13
+ npm install -D pino-pretty
14
+ ```
15
+
16
+ ## Configuration
17
+
18
+ ```typescript
19
+ import { pino } from "pino";
20
+
21
+ const logger = pino({
22
+ transport: process.env.NODE_ENV === "development"
23
+ ? { target: "pino-pretty", options: { colorize: true, translateTime: "HH:MM:ss Z" } }
24
+ : undefined,
25
+ level: process.env.LOG_LEVEL || "info",
26
+ });
27
+
28
+ export { logger };
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ ```typescript
34
+ logger.info("Server started on port 4000");
35
+ logger.error({ err }, "Failed to connect to database");
36
+ logger.warn({ userId, action: "rate_limit" }, "Rate limit exceeded");
37
+ logger.debug({ query, params }, "Executing database query");
38
+ ```
39
+
40
+ ## Best Practices
41
+
42
+ 1. Always pass Error objects as first argument: `logger.error({ err }, "msg")`
43
+ 2. Use structured context objects instead of string interpolation
44
+ 3. Never log sensitive data (passwords, tokens, PII)
45
+ 4. Use child loggers for request-scoped logging
46
+ 5. Set appropriate log levels (debug for dev, info for prod)
@@ -0,0 +1,54 @@
1
+ # E2E Testing Standards (Playwright)
2
+
3
+ > End-to-end testing for web applications.
4
+
5
+ ## Overview
6
+
7
+ Playwright provides cross-browser E2E testing with auto-waiting and network interception.
8
+
9
+ ## Setup
10
+
11
+ ```bash
12
+ npm install -D @playwright/test
13
+ npx playwright install
14
+ ```
15
+
16
+ ## Test Structure
17
+
18
+ ```
19
+ e2e/
20
+ ├── auth.spec.ts # Login/logout flows
21
+ ├── customers.spec.ts # Customer CRUD flows
22
+ ├── navigation.spec.ts # Navigation & routing
23
+ └── fixtures/
24
+ └── auth.fixture.ts # Authenticated test context
25
+ ```
26
+
27
+ ## Example Test
28
+
29
+ ```typescript
30
+ import { test, expect } from "@playwright/test";
31
+
32
+ test("user can login and see dashboard", async ({ page }) => {
33
+ await page.goto("/login");
34
+ await page.fill("[name=email]", "admin@example.com");
35
+ await page.fill("[name=password]", "password123");
36
+ await page.click("button[type=submit]");
37
+ await expect(page.locator("text=Dashboard")).toBeVisible();
38
+ });
39
+
40
+ test("admin can view customers list", async ({ page }) => {
41
+ await page.goto("/customers");
42
+ await expect(page.locator("table")).toBeVisible();
43
+ await expect(page.locator("text=Northwind")).toBeVisible();
44
+ });
45
+ ```
46
+
47
+ ## Best Practices
48
+
49
+ 1. Test critical user flows (login, CRUD, navigation)
50
+ 2. Use page objects for reusable test actions
51
+ 3. Run tests in CI pipeline on every push
52
+ 4. Use fixtures for authenticated test contexts
53
+ 5. Keep tests independent — no shared state
54
+ 6. Use data-testid attributes for reliable selectors
@@ -0,0 +1,32 @@
1
+ # ⚖️ Corporate Code Quality and Discipline (Linting & Standards)
2
+
3
+ This document defines the technical discipline rules that all code produced by the Agent Atabey army must comply with. The goal is zero errors, maximum readability, and sustainability.
4
+
5
+ ## 1. TypeScript Discipline
6
+ - **Strict Mode:** `strict: true` is mandatory in all projects.
7
+ - **No Explicit Any:** The use of `any` is strictly forbidden. `unknown` should be used for uncertain types and verified with type guards.
8
+ - **Exhaustive Checks:** All cases must be checked (exhaustive) in `switch-case` structures, or safety must be provided with the `never` type.
9
+
10
+ ## 2. ESLint and Static Analysis (AST Enforced)
11
+ - **Real-Time AST Audits:** Every file mutation by an agent is scanned via **Abstract Syntax Tree (AST)** analysis. Prohibited patterns (`any`, `console.log`) are blocked at the protocol level.
12
+ - **Zero Warnings:** No ESLint warnings or errors can exist in the codebase.
13
+ - **Naming Conventions:**
14
+ - Variables and functions: `camelCase`
15
+ - Classes and Types: `PascalCase`
16
+ - Constants: `UPPER_SNAKE_CASE`
17
+ - File names: `kebab-case`
18
+ - **Imports:** Unused imports should be automatically cleaned, and the import order should be regular.
19
+
20
+ ## 3. Formatting (Prettier)
21
+ - **Consistency:** Uniform formatting is mandatory in all files.
22
+ - **Indentation:** 4 spaces.
23
+ - **Quotes:** Use of double quotes (`"`).
24
+ - **Semicolons:** Each statement must end with a semicolon (`;`).
25
+
26
+ ## 4. Error Handling
27
+ - **No Silent Failures:** Empty `catch` blocks are forbidden. Every error must at least be logged or passed to the upper layer.
28
+ - **Custom Errors:** Project-specific `AppError` classes should be used for business logic errors.
29
+
30
+ ## 5. Audit Loop
31
+ - **Pre-commit:** `npm run lint` and `npm run type-check` must be run before code is committed.
32
+ - **@quality Audit:** All changes are audited by the `@quality` agent according to these standards.
@@ -0,0 +1,72 @@
1
+ # React Query (TanStack Query) Standards
2
+
3
+ > Server state management for React applications.
4
+
5
+ ## Overview
6
+
7
+ React Query handles server state: caching, background refetching, optimistic updates, and pagination.
8
+
9
+ ## Setup
10
+
11
+ ```bash
12
+ npm install @tanstack/react-query
13
+ ```
14
+
15
+ ## Provider Setup
16
+
17
+ ```tsx
18
+ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
19
+
20
+ const queryClient = new QueryClient({
21
+ defaultOptions: {
22
+ queries: {
23
+ staleTime: 1000 * 60 * 5,
24
+ retry: 2,
25
+ refetchOnWindowFocus: false,
26
+ },
27
+ },
28
+ });
29
+
30
+ export function Providers({ children }: { children: React.ReactNode }) {
31
+ return (
32
+ <QueryClientProvider client={queryClient}>
33
+ {children}
34
+ </QueryClientProvider>
35
+ );
36
+ }
37
+ ```
38
+
39
+ ## Hook Pattern
40
+
41
+ ```tsx
42
+ import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
43
+
44
+ // Fetch
45
+ export function useCustomers(page = 1) {
46
+ return useQuery({
47
+ queryKey: ["customers", { page }],
48
+ queryFn: () => fetch(`/api/v1/customers?page=${page}`).then(r => r.json()),
49
+ });
50
+ }
51
+
52
+ // Mutation with cache invalidation
53
+ export function useCreateCustomer() {
54
+ const queryClient = useQueryClient();
55
+ return useMutation({
56
+ mutationFn: (data) => fetch("/api/v1/customers", {
57
+ method: "POST",
58
+ body: JSON.stringify(data),
59
+ }).then(r => r.json()),
60
+ onSuccess: () => queryClient.invalidateQueries({ queryKey: ["customers"] }),
61
+ });
62
+ }
63
+ ```
64
+
65
+ ## Best Practices
66
+
67
+ 1. Use query keys as arrays: `["resource", params]`
68
+ 2. Set appropriate stale times based on data volatility
69
+ 3. Use `onMutate` for optimistic updates
70
+ 4. Keep API calls in dedicated hooks
71
+ 5. Use `enabled` option for dependent queries
72
+ 6. Implement error boundaries for query errors
@@ -0,0 +1,62 @@
1
+ # React Router Standards
2
+
3
+ > Client-side routing for React applications.
4
+
5
+ ## Overview
6
+
7
+ React Router v7 provides declarative routing with nested layouts, loaders, and actions.
8
+
9
+ ## Setup
10
+
11
+ ```bash
12
+ npm install react-router-dom
13
+ ```
14
+
15
+ ## Basic Setup
16
+
17
+ ```tsx
18
+ import { createBrowserRouter, RouterProvider } from "react-router-dom";
19
+
20
+ const router = createBrowserRouter([
21
+ {
22
+ path: "/",
23
+ element: <Layout />,
24
+ children: [
25
+ { index: true, element: <Dashboard /> },
26
+ { path: "customers", element: <Customers /> },
27
+ { path: "customers/:id", element: <CustomerDetail /> },
28
+ { path: "users", element: <Users /> },
29
+ { path: "settings", element: <Settings /> },
30
+ ],
31
+ },
32
+ ]);
33
+
34
+ export function App() {
35
+ return <RouterProvider router={router} />;
36
+ }
37
+ ```
38
+
39
+ ## Protected Routes
40
+
41
+ ```tsx
42
+ function ProtectedRoute({ children, roles }: { children: React.ReactNode; roles?: string[] }) {
43
+ const { user } = useAuth();
44
+
45
+ if (!user) return <Navigate to="/login" replace />;
46
+ if (roles && !roles.includes(user.role)) return <Navigate to="/" replace />;
47
+
48
+ return <>{children}</>;
49
+ }
50
+
51
+ // Usage in router
52
+ { path: "admin", element: <ProtectedRoute roles={["ADMIN"]}><AdminPanel /></ProtectedRoute> }
53
+ ```
54
+
55
+ ## Best Practices
56
+
57
+ 1. Use nested routes for consistent layouts
58
+ 2. Implement lazy loading with `React.lazy()` for route splitting
59
+ 3. Use route loaders for data fetching
60
+ 4. Protect admin routes with role-based guards
61
+ 5. Keep routes organized in a single configuration
62
+ 6. Use `useNavigate` for programmatic navigation
@@ -0,0 +1,33 @@
1
+ # 🛡️ Security Audit Standards
2
+
3
+ This document defines the security audit procedures required for all Agent Atabey-managed projects to ensure a "Defense-in-Depth" posture, aligned with OWASP ASVS and the OWASP Top 10.
4
+
5
+ ## 1. Automated Vulnerability Scanning
6
+ - **Dependency Audit:** All projects must execute `npm audit` within the CI/CD pipeline. Any high/critical vulnerability must block deployment.
7
+ - **Static Analysis (SAST):** Use `eslint-plugin-security` to detect potential vulnerabilities (e.g., insecure crypto, command injection risks) in the codebase.
8
+ - **Secret Scanning:** Run a secret scanner (e.g., gitleaks) on every commit; a detected secret blocks the pipeline and triggers rotation.
9
+ - **SCA & SBOM:** Maintain a Software Bill of Materials. Pin dependency versions with a committed lockfile; forbid floating ranges in production manifests.
10
+
11
+ ## 2. Agent Governance (Prompt Security)
12
+ - **Prompt Sanitization:** All user-provided inputs must pass through `src/cli/utils/string.ts` sanitizers before being injected into system prompts.
13
+ - **Tool Allowlist:** Agents must only have access to a strictly defined, minimal toolset required for their role.
14
+ - **Approval Flow:** Any agent requesting an action that modifies persistent state (File write, DB mutation) must be routed through the `@manager` approval gate.
15
+ - **Path Confinement:** File-system tools must reject path traversal (`..`) and operate only within the project root (`safePath` enforcement).
16
+
17
+ ## 3. Application Security Review (OWASP Top 10)
18
+ Every audit must explicitly verify:
19
+ - **Access Control (A01):** Authorization checked server-side on every protected resource; no reliance on client-side hiding. RLS enforced at the database tier.
20
+ - **Injection (A03):** Parameterized/type-safe queries only (Kysely); no string-concatenated SQL or shell.
21
+ - **Insecure Design (A04):** Threat model documented for new high-risk features before implementation.
22
+ - **Auth Failures (A07):** Strong password/credential policy, session expiry, brute-force rate limiting, secure cookie flags.
23
+ - **SSRF (A10):** Outbound requests to user-controlled URLs are validated against an allowlist.
24
+
25
+ ## 4. Secret Management
26
+ - **Environment Isolation:** No secrets in code. Use `.env` files exclusively.
27
+ - **CI/CD Secrets:** Production secrets must be managed via GitHub Secrets/Action Variables, never committed to the repository.
28
+ - **Rotation:** Secrets have a documented rotation policy; a leaked secret is rotated immediately and the incident logged in the audit trail.
29
+
30
+ ## 5. Audit Cadence and Reporting
31
+ - **Frequency:** Automated scans run on every PR; a full manual review by `@security` is required before any release tagged `vX.Y.0` and after any high-risk change.
32
+ - **Findings Ledger:** Every finding is recorded with severity (Critical/High/Medium/Low), a `Trace ID`, owner, and remediation status. Critical/High findings block release.
33
+ - **Penetration Testing:** High-risk surfaces (auth, billing, PII export) receive a focused pen-test before going to production.
@@ -0,0 +1,21 @@
1
+ # 🛡️ Corporate Security and Data Protection Standards
2
+
3
+ This document defines the security protocols and data protection standards for projects managed by Agent Atabey.
4
+
5
+ ## 1. Database Security (RLS)
6
+ - **Row Level Security (RLS):** All user data must be protected with RLS policies. A user cannot access another user's data except through a permission protocol approved by `@manager`.
7
+ - **SQL Injection:** Raw SQL queries are strictly forbidden (Kysely mandatory).
8
+ - **Encryption at Rest:** Sensitive data (PII) must be stored encrypted in the database.
9
+
10
+ ## 2. Authentication and Authorization
11
+ - **JWT / Session:** Only secure authentication methods approved by the `@security` agent are used.
12
+ - **Role Based Access Control (RBAC):** Authorization schemes must be managed centrally under `apps/backend/src/security/roles.ts`.
13
+
14
+ ## 3. API Security
15
+ - **CORS:** Only allowed domains can access the API.
16
+ - **Rate Limiting:** Rate limiting must be applied for all API endpoints.
17
+ - **Input Validation:** All inputs (request body, params) must be strictly validated with Zod or a similar library.
18
+
19
+ ## 4. Secret Management
20
+ - **No Hardcoded Secrets:** API keys, passwords, or secret keys can never be stored in the code.
21
+ - **.env Discipline:** All secret variables must be managed via the `.env` file, and this file must never be pushed to git.
@@ -0,0 +1,50 @@
1
+ # API Documentation Standards
2
+
3
+ > OpenAPI/Swagger documentation for Fastify APIs.
4
+
5
+ ## Overview
6
+
7
+ Auto-generated API documentation using @fastify/swagger and @fastify/swagger-ui.
8
+
9
+ ## Setup
10
+
11
+ ```bash
12
+ npm install @fastify/swagger @fastify/swagger-ui
13
+ ```
14
+
15
+ ## Configuration
16
+
17
+ ```typescript
18
+ import swagger from "@fastify/swagger";
19
+ import swaggerUi from "@fastify/swagger-ui";
20
+
21
+ await app.register(swagger, {
22
+ openapi: {
23
+ info: {
24
+ title: "API Name",
25
+ version: "1.0.0",
26
+ description: "Enterprise API documentation",
27
+ },
28
+ servers: [{ url: process.env.API_URL || "http://localhost:4000" }],
29
+ components: {
30
+ securitySchemes: {
31
+ bearerAuth: {
32
+ type: "http",
33
+ scheme: "bearer",
34
+ bearerFormat: "JWT",
35
+ },
36
+ },
37
+ },
38
+ },
39
+ });
40
+
41
+ await app.register(swaggerUi, { routePrefix: "/docs" });
42
+ ```
43
+
44
+ ## Best Practices
45
+
46
+ 1. Define all request/response schemas using Zod or TypeBox
47
+ 2. Group routes by tags (Users, Customers, Reports)
48
+ 3. Include error responses in schema definitions
49
+ 4. Version your API (e.g., /api/v1/, /api/v2/)
50
+ 5. Keep documentation up to date with code changes
@@ -0,0 +1,29 @@
1
+ # 🌊 Corporate Tailwind CSS Standards
2
+
3
+ This document defines the rules required to maintain code quality and design discipline in projects using Tailwind CSS.
4
+
5
+ ## 1. Design Discipline and Constraints
6
+ - **No Arbitrary Values:** The use of arbitrary values like `h-[123px]` or `bg-[#fafafa]` is forbidden. All values must be fed from the theme in `tailwind.config.ts`.
7
+ - **Design Tokens:** Colors, spacing, radii, shadows, and typography are defined once as theme tokens. Components consume tokens, never raw hex/px.
8
+ - **Utility-First, Not Utility-Only:** Class structures that become too complex should be managed with `@apply` or by dividing them into components (Atomic Design).
9
+ - **Prettier Plugin:** `prettier-plugin-tailwindcss` must be used for class ordering.
10
+
11
+ ## 2. Responsive and Mobile-First
12
+ - **Mobile-First:** Styles should be written for mobile first, then expanded with `sm:`, `md:`, and `lg:` prefixes.
13
+ - **Consistency:** Consistent breakpoint usage across the project (standard Tailwind breakpoints) is mandatory.
14
+ - **Container Queries:** Prefer container queries for component-level responsiveness where the component can appear in varying layout widths.
15
+
16
+ ## 3. Clean Code and Organization
17
+ - **Clean Templates:** If there are more than 10 Tailwind classes in HTML/JSX, these classes should be organized with tools like `cva` (Class Variance Authority) or `clsx`/`tailwind-merge`.
18
+ - **Component Isolation:** UI components must be collected under `apps/web/src/components/ui/`, and each component must contain its own Tailwind classes.
19
+ - **No Conflicting Classes:** Use `tailwind-merge` to deduplicate conflicting utilities when composing variants.
20
+
21
+ ## 4. Theming and Dark Mode
22
+ - **Semantic Color Roles:** Use semantic names (`bg-surface`, `text-muted`, `border-default`) mapped to tokens, enabling theme swaps without touching markup.
23
+ - **Dark Mode:** Implement via the `dark:` variant driven by a class strategy, validated for contrast in both themes.
24
+
25
+ ## 5. Performance and Accessibility
26
+ - **JIT Mode:** Just-in-Time mode should always be used; the `content` glob must be accurate so unused styles are purged.
27
+ - **Contrast:** WCAG AA standards must be complied with when choosing theme colors (≥ 4.5:1 for body text, ≥ 3:1 for large text and UI components).
28
+ - **Focus States:** Never remove focus outlines without providing a visible, accessible alternative (`focus-visible:` rings).
29
+ - **Reduced Motion:** Respect `prefers-reduced-motion` for animations and transitions.
@@ -0,0 +1,31 @@
1
+ # 🧪 Corporate Testing Standards
2
+
3
+ This document defines the testing discipline and scope rules for projects managed by Agent Atabey. Code quality must be ensured with automated tests.
4
+
5
+ ## 1. Test Pyramid and Strategy
6
+ - **Unit Tests:** Written for the smallest parts of business logic. Must be fast and isolated.
7
+ - **Integration Tests:** Audits the compatibility of services with the database or external APIs.
8
+ - **E2E Tests:** Simulates critical user flows (Login, Checkout, etc.) in a real browser environment.
9
+
10
+ ## 2. Writing Rules and Naming
11
+ - **Framework:** Vitest (Unit/Integration) and Playwright (E2E) are standard.
12
+ - **File Naming:** The `[module-name].test.ts` format is used.
13
+ - **Pattern (Given-When-Then):**
14
+ ```typescript
15
+ it("should create a user when valid data is provided", async () => {
16
+ // Given
17
+ const userData = { ... };
18
+ // When
19
+ const result = await userService.create(userData);
20
+ // Then
21
+ expect(result.id).toBeDefined();
22
+ });
23
+ ```
24
+
25
+ ## 3. Scope and Success Criteria
26
+ - **Critical Path Coverage:** Auth, Payment, and Data Mutation processes must have 100% test coverage.
27
+ - **Zero Mock Policy (Internal):** Real contracts and test databases should be used between internal project services instead of mocks. External services (Stripe, Twilio, etc.) can be mocked.
28
+
29
+ ## 4. Auditing
30
+ - The `@quality` agent verifies that the relevant test file is updated in each new function.
31
+ - Code that does not pass tests (`npm run test`) is never approved.
@@ -0,0 +1,27 @@
1
+ # 🪙 Token Economy & Context Management Standards
2
+
3
+ This document defines the strict context management and token cost optimization rules for Agent Atabey projects. All agents must follow these mandates to minimize LLM usage costs and prevent context drift.
4
+
5
+ ## 1. Search Before Reading (Mandatory)
6
+ * **Rule:** Never execute a full directory listing (`list_dir`) recursively or read an entire file (`read_file`) without searching first.
7
+ * **Method:** Use `grep_search` to find the exact line number of interest. Then, read only the surrounding lines (e.g. ±20 lines) using `view_file` with `StartLine` and `EndLine`.
8
+ * **Cost Impact:** Prevents thousands of unnecessary input tokens from being loaded into context.
9
+
10
+ ## 2. Surgical Modifications
11
+ * **Rule:** Do not write or replace whole files unless they are very small (<50 lines).
12
+ * **Method:** Use targeted text replacement tools (`replace_text`, `patch_file`, `replace_file_content`, `multi_replace_file_content`) to apply edits to specific lines only.
13
+ * **Cost Impact:** Reduces output token generation by up to 95%, keeping LLM responses fast and cost-effective.
14
+
15
+ ## 3. Output Conciseness
16
+ * **Rule:** Keep explanations and logs to the absolute minimum required.
17
+ * **Method:** Do not output verbose comments, intermediate thinking logs, or redundant progress messages. Avoid repeating what the code does; explain only the "why" if non-obvious.
18
+ * **Cost Impact:** Saves output tokens in CLI streams and communication queues.
19
+
20
+ ## 4. Context Compaction & Memory Pruning
21
+ * **Rule:** Do not carry the entire history of the development session.
22
+ * **Method:** Before initiating a task, retrieve only the active state via `get_memory_insights` or by reading `PROJECT_MEMORY.md`. Archive completed tasks and older logs in `.atabey/memory/archive/`.
23
+ * **Cost Impact:** Keeps the prompt context window clean and prevents performance degradation due to long-context attention dilution.
24
+
25
+ ## 5. No Blind Coding & Stopping Gates
26
+ * **Rule:** Halt execution and ask the user for clarification if a task requires reading more than 5 large files without producing a clear search match.
27
+ * **Method:** Do not guess the structure or keep querying the filesystem repeatedly. Report the block to `@manager` and wait.
@@ -0,0 +1,49 @@
1
+ # TypeORM Standards
2
+
3
+ > Full-featured ORM with decorator-based entity definitions.
4
+
5
+ ## Setup
6
+
7
+ ```typescript
8
+ import { DataSource } from "typeorm";
9
+
10
+ export const AppDataSource = new DataSource({
11
+ type: "sqlite",
12
+ database: process.env.DATABASE_PATH || "./dev.db",
13
+ synchronize: process.env.NODE_ENV === "development",
14
+ logging: process.env.NODE_ENV === "development",
15
+ entities: ["src/database/typeorm/entities/*.ts"],
16
+ migrations: ["src/database/typeorm/migrations/*.ts"],
17
+ });
18
+ ```
19
+
20
+ ## Entity Pattern
21
+
22
+ ```typescript
23
+ import { Entity, PrimaryColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
24
+
25
+ @Entity("users")
26
+ export class UserEntity {
27
+ @PrimaryColumn()
28
+ id!: string;
29
+ @Column({ unique: true })
30
+ email!: string;
31
+ @Column()
32
+ fullName!: string;
33
+ @Column({ default: "VIEWER" })
34
+ role!: string;
35
+ @CreateDateColumn()
36
+ createdAt!: Date;
37
+ @UpdateDateColumn()
38
+ updatedAt!: Date;
39
+ @DeleteDateColumn()
40
+ deletedAt?: Date;
41
+ }
42
+ ```
43
+
44
+ ## Best Practices
45
+ 1. Use `@DeleteDateColumn()` for soft deletes
46
+ 2. Set `synchronize: false` in production
47
+ 3. Use `@ManyToOne` / `@OneToMany` for relations
48
+ 4. Import `reflect-metadata` at entry point
49
+ 5. Generate migrations, don't rely on synchronize