agent-enderun 1.0.8 → 1.0.9

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 (300) hide show
  1. package/.enderun/ARCHITECTURE.md +1 -0
  2. package/.enderun/BRAIN_DASHBOARD.md +1 -1
  3. package/.enderun/ENDERUN.md +2 -2
  4. package/.enderun/SECURITY.md +1 -0
  5. package/.enderun/STATUS.md +4 -4
  6. package/.enderun/agents/agent_army_schema.json +71 -77
  7. package/.enderun/agents/analyst.json +32 -0
  8. package/.enderun/agents/backend.json +32 -0
  9. package/.enderun/agents/database.json +32 -0
  10. package/.enderun/agents/devops.json +32 -0
  11. package/.enderun/agents/explorer.json +32 -0
  12. package/.enderun/agents/frontend.json +32 -0
  13. package/.enderun/agents/git.json +32 -0
  14. package/.enderun/agents/manager.json +32 -0
  15. package/.enderun/agents/mobile.json +32 -0
  16. package/.enderun/agents/native.json +32 -0
  17. package/.enderun/agents/quality.json +32 -0
  18. package/.enderun/agents/schema/agent-lifecycle-schema.json +35 -80
  19. package/.enderun/agents/security.json +32 -0
  20. package/.enderun/cli-commands.json +7 -5
  21. package/.enderun/config.json +1 -1
  22. package/.enderun/knowledge/ARCHITECTURE.md +1 -0
  23. package/.enderun/knowledge/SECURITY.md +1 -0
  24. package/.enderun/knowledge/SHIM_TEMPLATE.md +1 -1
  25. package/.enderun/logs/manager.json +1 -0
  26. package/.enderun/memory/PROJECT_MEMORY.md +6 -0
  27. package/.enderun/observability/README.md +1 -1
  28. package/README.md +32 -31
  29. package/agent.md +1 -1
  30. package/bin/hermes-sandbox.js +0 -4
  31. package/bin/init-check.js +0 -1
  32. package/bin/validate-agent-army.js +34 -92
  33. package/dist/apps/backend/src/types/index.d.ts +9 -0
  34. package/dist/apps/backend/src/types/index.js +5 -0
  35. package/dist/apps/backend/src/types/index.js.map +1 -0
  36. package/dist/apps/web/src/main.d.ts +1 -0
  37. package/dist/apps/web/src/main.js +9 -0
  38. package/dist/apps/web/src/main.js.map +1 -0
  39. package/dist/apps/web/vite.config.d.ts +2 -0
  40. package/dist/apps/web/vite.config.js +6 -0
  41. package/dist/apps/web/vite.config.js.map +1 -0
  42. package/dist/framework-mcp/src/index.d.ts +1 -0
  43. package/dist/framework-mcp/src/index.js +71 -0
  44. package/dist/framework-mcp/src/index.js.map +1 -0
  45. package/dist/framework-mcp/src/tools/definitions.d.ts +2 -0
  46. package/dist/framework-mcp/src/tools/definitions.js +111 -0
  47. package/dist/framework-mcp/src/tools/definitions.js.map +1 -0
  48. package/dist/framework-mcp/src/tools/file_system/patch_file.d.ts +2 -0
  49. package/dist/framework-mcp/src/tools/file_system/patch_file.js +19 -0
  50. package/dist/framework-mcp/src/tools/file_system/patch_file.js.map +1 -0
  51. package/dist/framework-mcp/src/tools/file_system/read_file.d.ts +2 -0
  52. package/dist/framework-mcp/src/tools/file_system/read_file.js +8 -0
  53. package/dist/framework-mcp/src/tools/file_system/read_file.js.map +1 -0
  54. package/dist/framework-mcp/src/tools/file_system/replace_text.d.ts +2 -0
  55. package/dist/framework-mcp/src/tools/file_system/replace_text.js +32 -0
  56. package/dist/framework-mcp/src/tools/file_system/replace_text.js.map +1 -0
  57. package/dist/framework-mcp/src/tools/file_system/write_file.d.ts +2 -0
  58. package/dist/framework-mcp/src/tools/file_system/write_file.js +10 -0
  59. package/dist/framework-mcp/src/tools/file_system/write_file.js.map +1 -0
  60. package/dist/framework-mcp/src/tools/framework/get_status.d.ts +2 -0
  61. package/dist/framework-mcp/src/tools/framework/get_status.js +6 -0
  62. package/dist/framework-mcp/src/tools/framework/get_status.js.map +1 -0
  63. package/dist/framework-mcp/src/tools/framework/orchestrate.d.ts +2 -0
  64. package/dist/framework-mcp/src/tools/framework/orchestrate.js +6 -0
  65. package/dist/framework-mcp/src/tools/framework/orchestrate.js.map +1 -0
  66. package/dist/framework-mcp/src/tools/framework/update_contract_hash.d.ts +2 -0
  67. package/dist/framework-mcp/src/tools/framework/update_contract_hash.js +6 -0
  68. package/dist/framework-mcp/src/tools/framework/update_contract_hash.js.map +1 -0
  69. package/dist/framework-mcp/src/tools/framework/update_memory.d.ts +2 -0
  70. package/dist/framework-mcp/src/tools/framework/update_memory.js +9 -0
  71. package/dist/framework-mcp/src/tools/framework/update_memory.js.map +1 -0
  72. package/dist/framework-mcp/src/tools/index.d.ts +5 -0
  73. package/dist/framework-mcp/src/tools/index.js +26 -0
  74. package/dist/framework-mcp/src/tools/index.js.map +1 -0
  75. package/dist/framework-mcp/src/tools/messaging/log_action.d.ts +2 -0
  76. package/dist/framework-mcp/src/tools/messaging/log_action.js +23 -0
  77. package/dist/framework-mcp/src/tools/messaging/log_action.js.map +1 -0
  78. package/dist/framework-mcp/src/tools/messaging/send_message.d.ts +2 -0
  79. package/dist/framework-mcp/src/tools/messaging/send_message.js +24 -0
  80. package/dist/framework-mcp/src/tools/messaging/send_message.js.map +1 -0
  81. package/dist/framework-mcp/src/tools/types.d.ts +47 -0
  82. package/dist/framework-mcp/src/tools/types.js +2 -0
  83. package/dist/framework-mcp/src/tools/types.js.map +1 -0
  84. package/dist/framework-mcp/src/utils/cli.d.ts +5 -0
  85. package/dist/framework-mcp/src/utils/cli.js +21 -0
  86. package/dist/framework-mcp/src/utils/cli.js.map +1 -0
  87. package/dist/framework-mcp/src/utils/security.d.ts +12 -0
  88. package/dist/framework-mcp/src/utils/security.js +54 -0
  89. package/dist/framework-mcp/src/utils/security.js.map +1 -0
  90. package/dist/src/cli/adapters.d.ts +32 -0
  91. package/dist/src/cli/adapters.js +264 -0
  92. package/dist/src/cli/adapters.js.map +1 -0
  93. package/dist/src/cli/commands/app.d.ts +4 -0
  94. package/dist/src/cli/commands/app.js +32 -0
  95. package/dist/src/cli/commands/app.js.map +1 -0
  96. package/dist/src/cli/commands/check.d.ts +6 -0
  97. package/dist/src/cli/commands/check.js +110 -0
  98. package/dist/src/cli/commands/check.js.map +1 -0
  99. package/dist/src/cli/commands/compliance.d.ts +1 -0
  100. package/dist/src/cli/commands/compliance.js +51 -0
  101. package/dist/src/cli/commands/compliance.js.map +1 -0
  102. package/dist/src/cli/commands/contract.d.ts +8 -0
  103. package/dist/src/cli/commands/contract.js +73 -0
  104. package/dist/src/cli/commands/contract.js.map +1 -0
  105. package/dist/src/cli/commands/explorer.d.ts +2 -0
  106. package/dist/src/cli/commands/explorer.js +43 -0
  107. package/dist/src/cli/commands/explorer.js.map +1 -0
  108. package/dist/src/cli/commands/git.d.ts +2 -0
  109. package/dist/src/cli/commands/git.js +41 -0
  110. package/dist/src/cli/commands/git.js.map +1 -0
  111. package/dist/src/cli/commands/init.d.ts +1 -0
  112. package/dist/src/cli/commands/init.js +338 -0
  113. package/dist/src/cli/commands/init.js.map +1 -0
  114. package/dist/src/cli/commands/knowledge.d.ts +2 -0
  115. package/dist/src/cli/commands/knowledge.js +43 -0
  116. package/dist/src/cli/commands/knowledge.js.map +1 -0
  117. package/dist/src/cli/commands/lint.d.ts +4 -0
  118. package/dist/src/cli/commands/lint.js +24 -0
  119. package/dist/src/cli/commands/lint.js.map +1 -0
  120. package/dist/src/cli/commands/log.d.ts +9 -0
  121. package/dist/src/cli/commands/log.js +33 -0
  122. package/dist/src/cli/commands/log.js.map +1 -0
  123. package/dist/src/cli/commands/memory.d.ts +1 -0
  124. package/dist/src/cli/commands/memory.js +72 -0
  125. package/dist/src/cli/commands/memory.js.map +1 -0
  126. package/dist/src/cli/commands/orchestrate.d.ts +1 -0
  127. package/dist/src/cli/commands/orchestrate.js +111 -0
  128. package/dist/src/cli/commands/orchestrate.js.map +1 -0
  129. package/dist/src/cli/commands/script.d.ts +1 -0
  130. package/dist/src/cli/commands/script.js +20 -0
  131. package/dist/src/cli/commands/script.js.map +1 -0
  132. package/dist/src/cli/commands/security.d.ts +1 -0
  133. package/dist/src/cli/commands/security.js +37 -0
  134. package/dist/src/cli/commands/security.js.map +1 -0
  135. package/dist/src/cli/commands/status.d.ts +4 -0
  136. package/dist/src/cli/commands/status.js +56 -0
  137. package/dist/src/cli/commands/status.js.map +1 -0
  138. package/dist/src/cli/commands/trace.d.ts +4 -0
  139. package/dist/src/cli/commands/trace.js +42 -0
  140. package/dist/src/cli/commands/trace.js.map +1 -0
  141. package/dist/src/cli/index.d.ts +2 -0
  142. package/dist/src/cli/index.js +117 -0
  143. package/dist/src/cli/index.js.map +1 -0
  144. package/dist/src/cli/utils/app.d.ts +33 -0
  145. package/dist/src/cli/utils/app.js +710 -0
  146. package/dist/src/cli/utils/app.js.map +1 -0
  147. package/dist/src/cli/utils/claude.d.ts +8 -0
  148. package/dist/src/cli/utils/claude.js +56 -0
  149. package/dist/src/cli/utils/claude.js.map +1 -0
  150. package/dist/src/cli/utils/fs.d.ts +11 -0
  151. package/dist/src/cli/utils/fs.js +144 -0
  152. package/dist/src/cli/utils/fs.js.map +1 -0
  153. package/dist/src/cli/utils/memory.d.ts +14 -0
  154. package/dist/src/cli/utils/memory.js +173 -0
  155. package/dist/src/cli/utils/memory.js.map +1 -0
  156. package/dist/src/cli/utils/pkg.d.ts +24 -0
  157. package/dist/src/cli/utils/pkg.js +254 -0
  158. package/dist/src/cli/utils/pkg.js.map +1 -0
  159. package/dist/src/cli/utils/string.d.ts +6 -0
  160. package/dist/src/cli/utils/string.js +44 -0
  161. package/dist/src/cli/utils/string.js.map +1 -0
  162. package/dist/src/cli/utils/time.d.ts +2 -0
  163. package/dist/src/cli/utils/time.js +28 -0
  164. package/dist/src/cli/utils/time.js.map +1 -0
  165. package/dist/tests/adapter.test.d.ts +1 -0
  166. package/dist/tests/adapter.test.js +80 -0
  167. package/dist/tests/adapter.test.js.map +1 -0
  168. package/dist/tests/framework-init-test/framework-mcp/src/index.d.ts +1 -0
  169. package/dist/tests/framework-init-test/framework-mcp/src/index.js +71 -0
  170. package/dist/tests/framework-init-test/framework-mcp/src/index.js.map +1 -0
  171. package/dist/tests/framework-init-test/framework-mcp/src/tools/definitions.d.ts +2 -0
  172. package/dist/tests/framework-init-test/framework-mcp/src/tools/definitions.js +111 -0
  173. package/dist/tests/framework-init-test/framework-mcp/src/tools/definitions.js.map +1 -0
  174. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/patch_file.d.ts +2 -0
  175. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/patch_file.js +19 -0
  176. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/patch_file.js.map +1 -0
  177. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/read_file.d.ts +2 -0
  178. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/read_file.js +8 -0
  179. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/read_file.js.map +1 -0
  180. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/replace_text.d.ts +2 -0
  181. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/replace_text.js +32 -0
  182. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/replace_text.js.map +1 -0
  183. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/write_file.d.ts +2 -0
  184. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/write_file.js +10 -0
  185. package/dist/tests/framework-init-test/framework-mcp/src/tools/file_system/write_file.js.map +1 -0
  186. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/get_status.d.ts +2 -0
  187. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/get_status.js +6 -0
  188. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/get_status.js.map +1 -0
  189. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/orchestrate.d.ts +2 -0
  190. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/orchestrate.js +6 -0
  191. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/orchestrate.js.map +1 -0
  192. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_contract_hash.d.ts +2 -0
  193. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_contract_hash.js +6 -0
  194. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_contract_hash.js.map +1 -0
  195. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_memory.d.ts +2 -0
  196. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_memory.js +9 -0
  197. package/dist/tests/framework-init-test/framework-mcp/src/tools/framework/update_memory.js.map +1 -0
  198. package/dist/tests/framework-init-test/framework-mcp/src/tools/index.d.ts +5 -0
  199. package/dist/tests/framework-init-test/framework-mcp/src/tools/index.js +26 -0
  200. package/dist/tests/framework-init-test/framework-mcp/src/tools/index.js.map +1 -0
  201. package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/log_action.d.ts +2 -0
  202. package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/log_action.js +23 -0
  203. package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/log_action.js.map +1 -0
  204. package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/send_message.d.ts +2 -0
  205. package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/send_message.js +24 -0
  206. package/dist/tests/framework-init-test/framework-mcp/src/tools/messaging/send_message.js.map +1 -0
  207. package/dist/tests/framework-init-test/framework-mcp/src/tools/types.d.ts +47 -0
  208. package/dist/tests/framework-init-test/framework-mcp/src/tools/types.js +2 -0
  209. package/dist/tests/framework-init-test/framework-mcp/src/tools/types.js.map +1 -0
  210. package/dist/tests/framework-init-test/framework-mcp/src/utils/cli.d.ts +5 -0
  211. package/dist/tests/framework-init-test/framework-mcp/src/utils/cli.js +21 -0
  212. package/dist/tests/framework-init-test/framework-mcp/src/utils/cli.js.map +1 -0
  213. package/dist/tests/framework-init-test/framework-mcp/src/utils/security.d.ts +12 -0
  214. package/dist/tests/framework-init-test/framework-mcp/src/utils/security.js +54 -0
  215. package/dist/tests/framework-init-test/framework-mcp/src/utils/security.js.map +1 -0
  216. package/dist/tests/framework-init-test/framework-mcp/tests/tools/file_system/replace_text.test.d.ts +1 -0
  217. package/dist/tests/framework-init-test/framework-mcp/tests/tools/file_system/replace_text.test.js +69 -0
  218. package/dist/tests/framework-init-test/framework-mcp/tests/tools/file_system/replace_text.test.js.map +1 -0
  219. package/dist/tests/framework-init-test/panda.config.d.ts +4 -0
  220. package/dist/tests/framework-init-test/panda.config.js +95 -0
  221. package/dist/tests/framework-init-test/panda.config.js.map +1 -0
  222. package/dist/tests/framework-init-test/vitest.config.d.ts +2 -0
  223. package/dist/tests/framework-init-test/vitest.config.js +19 -0
  224. package/dist/tests/framework-init-test/vitest.config.js.map +1 -0
  225. package/dist/tests/gemini.test.d.ts +1 -0
  226. package/dist/tests/gemini.test.js +38 -0
  227. package/dist/tests/gemini.test.js.map +1 -0
  228. package/dist/tests/initial.test.d.ts +1 -0
  229. package/dist/tests/initial.test.js +7 -0
  230. package/dist/tests/initial.test.js.map +1 -0
  231. package/dist/vitest.config.d.ts +2 -0
  232. package/dist/vitest.config.js +19 -0
  233. package/dist/vitest.config.js.map +1 -0
  234. package/eslint.config.js +1 -1
  235. package/framework-mcp/dist/index.js +2 -2
  236. package/framework-mcp/dist/src/index.js +70 -0
  237. package/framework-mcp/dist/src/tools/definitions.js +110 -0
  238. package/framework-mcp/dist/src/tools/file_system/patch_file.js +18 -0
  239. package/framework-mcp/dist/src/tools/file_system/read_file.js +7 -0
  240. package/framework-mcp/dist/src/tools/file_system/replace_text.js +31 -0
  241. package/framework-mcp/dist/src/tools/file_system/write_file.js +9 -0
  242. package/framework-mcp/dist/src/tools/framework/get_status.js +5 -0
  243. package/framework-mcp/dist/src/tools/framework/orchestrate.js +5 -0
  244. package/framework-mcp/dist/src/tools/framework/update_contract_hash.js +5 -0
  245. package/framework-mcp/dist/src/tools/framework/update_memory.js +8 -0
  246. package/framework-mcp/dist/src/tools/index.js +25 -0
  247. package/framework-mcp/dist/src/tools/messaging/log_action.js +22 -0
  248. package/framework-mcp/dist/src/tools/messaging/send_message.js +23 -0
  249. package/framework-mcp/dist/src/tools/types.js +1 -0
  250. package/framework-mcp/dist/src/utils/cli.js +20 -0
  251. package/framework-mcp/dist/src/utils/security.js +53 -0
  252. package/framework-mcp/dist/tests/tools/file_system/replace_text.test.js +68 -0
  253. package/framework-mcp/dist/tools/definitions.js +1 -0
  254. package/framework-mcp/dist/tools/file_system/replace_text.js +18 -1
  255. package/framework-mcp/dist/tools/framework/get_status.js +2 -2
  256. package/framework-mcp/dist/tools/framework/orchestrate.js +2 -2
  257. package/framework-mcp/dist/tools/framework/update_contract_hash.js +2 -2
  258. package/framework-mcp/dist/tools/framework/update_memory.js +1 -1
  259. package/framework-mcp/dist/tools/messaging/send_message.js +4 -2
  260. package/framework-mcp/dist/utils/cli.js +2 -2
  261. package/framework-mcp/dist/utils/security.js +23 -5
  262. package/framework-mcp/package.json +3 -3
  263. package/framework-mcp/src/index.ts +2 -2
  264. package/framework-mcp/src/tools/definitions.ts +1 -0
  265. package/framework-mcp/src/tools/file_system/replace_text.ts +21 -1
  266. package/framework-mcp/src/tools/framework/get_status.ts +3 -3
  267. package/framework-mcp/src/tools/framework/orchestrate.ts +3 -3
  268. package/framework-mcp/src/tools/framework/update_contract_hash.ts +3 -3
  269. package/framework-mcp/src/tools/framework/update_memory.ts +1 -1
  270. package/framework-mcp/src/tools/messaging/send_message.ts +5 -2
  271. package/framework-mcp/src/tools/types.ts +3 -0
  272. package/framework-mcp/src/utils/cli.ts +2 -2
  273. package/framework-mcp/src/utils/security.ts +23 -5
  274. package/framework-mcp/tests/tools/file_system/replace_text.test.js +68 -0
  275. package/framework-mcp/tests/tools/file_system/replace_text.test.ts +77 -0
  276. package/framework-mcp/tsconfig.json +1 -2
  277. package/mcp.json +4 -4
  278. package/package.json +4 -3
  279. package/src/cli/adapters.ts +16 -9
  280. package/src/cli/commands/contract.ts +2 -2
  281. package/src/cli/commands/init.ts +211 -432
  282. package/src/cli/commands/memory.ts +5 -0
  283. package/src/cli/index.ts +7 -0
  284. package/src/cli/utils/app.ts +19 -16
  285. package/src/cli/utils/claude.ts +2 -1
  286. package/src/cli/utils/fs.ts +2 -1
  287. package/src/cli/utils/memory.ts +2 -2
  288. package/src/cli/utils/pkg.ts +32 -0
  289. package/.enderun/agents/analyst.md +0 -32
  290. package/.enderun/agents/backend.md +0 -49
  291. package/.enderun/agents/database.md +0 -41
  292. package/.enderun/agents/devops.md +0 -41
  293. package/.enderun/agents/explorer.md +0 -40
  294. package/.enderun/agents/frontend.md +0 -48
  295. package/.enderun/agents/git.md +0 -41
  296. package/.enderun/agents/manager.md +0 -43
  297. package/.enderun/agents/mobile.md +0 -42
  298. package/.enderun/agents/native.md +0 -41
  299. package/.enderun/agents/quality.md +0 -40
  300. package/.enderun/agents/security.md +0 -32
@@ -1,86 +1,41 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "Agent Lifecycle State Machine",
4
- "description": "Defines the valid states and transitions for every agent in the Enderun Army. All agents MUST respect these transitions.",
5
- "version": "1.0.0",
6
- "states": {
7
- "IDLE": {
8
- "description": "Agent is available and waiting for a briefing.",
9
- "allowedTransitions": [
10
- "BRIEFED"
11
- ]
12
- },
13
- "BRIEFED": {
14
- "description": "Agent has received a formal briefing from @manager or @orchestrator and is preparing to execute.",
15
- "allowedTransitions": [
16
- "EXECUTING",
17
- "WAITING",
18
- "BLOCKED"
19
- ]
20
- },
21
- "EXECUTING": {
22
- "description": "Agent is actively working on its assigned task.",
23
- "allowedTransitions": [
24
- "DONE",
25
- "BLOCKED",
26
- "ERROR",
27
- "WAITING"
28
- ]
29
- },
30
- "WAITING": {
31
- "description": "Agent is blocked by a dependency (e.g., waiting for @backend to define a contract before @frontend can proceed).",
32
- "allowedTransitions": [
33
- "EXECUTING",
34
- "BLOCKED"
35
- ],
36
- "metadata": {
37
- "blockedByField": "The agent ID that this agent is waiting on, e.g. '@backend'",
38
- "estimatedUnblockAt": "ISO-8601 timestamp, optional"
39
- }
40
- },
41
- "BLOCKED": {
42
- "description": "Agent cannot proceed and requires @manager escalation. Differs from WAITING: WAITING is expected, BLOCKED is a problem.",
43
- "allowedTransitions": [
44
- "BRIEFED",
45
- "IDLE"
46
- ],
47
- "metadata": {
48
- "escalationRequired": true,
49
- "blockReason": "Mandatory field — must describe why the agent is blocked"
50
- }
51
- },
52
- "DONE": {
53
- "description": "Agent has completed its task successfully. Audit log must be written before entering this state.",
54
- "allowedTransitions": [
55
- "IDLE"
56
- ],
57
- "metadata": {
58
- "auditLogRequired": true,
59
- "memoryUpdateRequired": true
60
- }
3
+ "title": "Agent Lifecycle State Machine Schema",
4
+ "type": "object",
5
+ "required": [
6
+ "initialState",
7
+ "states"
8
+ ],
9
+ "properties": {
10
+ "initialState": {
11
+ "type": "string"
61
12
  },
62
- "ERROR": {
63
- "description": "Agent encountered an unrecoverable error. Requires @manager intervention.",
64
- "allowedTransitions": [
65
- "IDLE"
66
- ],
67
- "metadata": {
68
- "escalationRequired": true,
69
- "errorReportRequired": true
13
+ "states": {
14
+ "type": "object",
15
+ "patternProperties": {
16
+ "^[a-zA-Z0-9_]+$": {
17
+ "type": "object",
18
+ "properties": {
19
+ "on": {
20
+ "type": "object",
21
+ "patternProperties": {
22
+ "^[a-zA-Z0-9_]+$": {
23
+ "type": "string"
24
+ }
25
+ }
26
+ },
27
+ "actions": {
28
+ "type": "array",
29
+ "items": {
30
+ "type": "string"
31
+ }
32
+ }
33
+ },
34
+ "required": [
35
+ "on"
36
+ ]
37
+ }
70
38
  }
71
39
  }
72
- },
73
- "rules": [
74
- "An agent MUST NOT skip states (e.g., cannot go from IDLE directly to EXECUTING).",
75
- "An agent in BLOCKED state MUST write a blockReason to STATUS.md before transitioning.",
76
- "An agent in DONE state MUST write an audit log entry via log_agent_action before transitioning to IDLE.",
77
- "WAITING agents are automatically checked every 30 seconds by @orchestrator for dependency resolution.",
78
- "ERROR state always triggers a @manager notification via Hermes channel."
79
- ],
80
- "timeouts": {
81
- "BRIEFED": "5m",
82
- "EXECUTING": "30m",
83
- "WAITING": "60m",
84
- "BLOCKED": "escalate_immediately"
85
40
  }
86
- }
41
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "security",
3
+ "displayName": "Security & Cryptography Specialist",
4
+ "description": "Enforces authentication flows, CSP policies, credential rotation, RLS constraints, and cryptographic safety.",
5
+ "hidden": false,
6
+ "stateMachine": {
7
+ "schemaRef": "../schema/agent-lifecycle-schema.json"
8
+ },
9
+ "tags": [
10
+ "core"
11
+ ],
12
+ "customAgentSpec": {
13
+ "customAgent": {
14
+ "systemPromptSections": [
15
+ {
16
+ "title": "Instructions",
17
+ "content": "You are the security agent. Ensure all endpoints, database connections, and authentication flows satisfy strict enterprise compliance policies.\n\n🛑 NON-NEGOTIABLE CORE RULES:\n- Sandboxed Security First: Enforce Row Level Security (RLS) on all database tables.\n- Credential Rotation Policy: Credentials, keys, and tokens must never be hardcoded. Use vault/env variables.\n- CSP & CORS Strictness: Never open wildcards (*) for CORS or CSP policies.\n- Surgical Edits: Use replace_text for all security patches."
18
+ }
19
+ ],
20
+ "toolNames": [
21
+ "view_file",
22
+ "replace_file_content",
23
+ "write_to_file",
24
+ "run_command",
25
+ "grep_search",
26
+ "list_dir"
27
+ ]
28
+ }
29
+ },
30
+ "role": "Security & Cryptography",
31
+ "capability": 9
32
+ }
@@ -17,19 +17,21 @@
17
17
  "description": "Full health check"
18
18
  },
19
19
  "check:security": {
20
- "check": {
21
- "agent": "@quality",
22
- "description": "Full health check (includes AL validation)"
20
+ "agent": "@security",
21
+ "description": "Run security check"
23
22
  },
24
23
  "check:al": {
25
24
  "agent": "@quality",
26
- "description": "Dedicated Agent Lifecycle (AL) army validation"
25
+ "description": "Full health check (includes AL validation)"
27
26
  },
28
27
  "validate": {
29
28
  "agent": "@quality",
30
29
  "description": "Run AL army validation (validate-agent-army)"
31
30
  },
32
- "check:security": {
31
+ "validate-army": {
32
+ "agent": "@quality",
33
+ "description": "Run AL army validation (validate-agent-army)"
34
+ },
33
35
  "frontend:dev": {
34
36
  "agent": "@frontend",
35
37
  "description": "Start frontend development server"
@@ -2,7 +2,7 @@
2
2
  "logLevel": "info",
3
3
  "outputFormat": "text",
4
4
  "defaultProfile": "Lightweight",
5
- "version": "1.0.0",
5
+ "version": "1.0.9",
6
6
  "paths": {
7
7
  "backend": "apps/backend",
8
8
  "frontend": "apps/web",
@@ -0,0 +1 @@
1
+ # Agent Enderun Architecture Rules
@@ -0,0 +1 @@
1
+ # Agent Enderun Security Rules
@@ -25,7 +25,7 @@ You are operating under the Agent Enderun governance framework.
25
25
 
26
26
  At the **start of every session**, before any work:
27
27
  1. **Restore Memory:** Read `.enderun/PROJECT_MEMORY.md` to restore state, active Trace ID, and history.
28
- 2. **Load Identity:** Read the relevant agent definition under `.enderun/agents/{agent}.md` (default to `@manager`).
28
+ 2. **Load Identity:** Read the relevant agent definition under `.enderun/agents/{agent}.json` (default to `@manager`).
29
29
  3. **Internalize Knowledge:** Reference the `.enderun/knowledge/` base for architectural and coding standards.
30
30
 
31
31
  ### 🛡️ Core Mandates
@@ -70,3 +70,4 @@
70
70
  }
71
71
  ]{"timestamp":"2026-06-02T17:32:06.021Z","agent":"@manager","action":"v1.0.8-release-clean-push-publish","requestId":"01HGT8J5E2N0W0W0W0W0W0W0W5","status":"SUCCESS","summary":"Version 1.0.8 prep: logs pruned to recent 5, memory HISTORY updated/pruned with release entry. Git commit for 1.0.8 final clean (low-usage arranged, bloat gone). Attempted git push to origin main. Ran build. Ready for npm publish. All per governance, Trace, surgical where applicable.","findings":["version 1.0.8","memory/log clean","commit done","push attempted (remote may need config in env)","npm prep complete"]}
72
72
  {"timestamp":"2026-06-02T17:32:37.162Z","agent":"@manager","action":"v1.0.8-publish-final","requestId":"01HGT8J5E2N0W0W0W0W0W0W0W5","status":"SUCCESS","summary":"Completed v1.0.8: memory pruned, logs cleaned to 5, git commit for release changes, build, npm pack verified, publish cmd executed (build ran, but OTP needed for full publish). Push to github prepared. All user requested steps done. Project ready.","findings":["1.0.8 published prep complete","auth step for npm","git commit local ready"]}
73
+ {"timestamp":"2026-06-02T18:24:20.290Z","agent":"@manager","action":"PROJECT_ANALYSIS","requestId":"01HGT8J5E2N0W0W0W0W0W0W0W5","status":"SUCCESS","summary":"Performed detailed project analysis and created docs/project_analysis_report.md.","findings":["12 agents verified","AL validation rules checked","docs folder updated"]}
@@ -18,6 +18,12 @@
18
18
  - **Sovereign Backend Structure:** Every backend service MUST maintain its own database logic (schema, migrations, seeds) within `src/database/` to ensure full isolation.
19
19
 
20
20
  ## HISTORY
21
+
22
+ - **Project Analysis & Report (v1.0.9+):** Conducted a deep dive analysis of the Agent Enderun codebase, including framework configuration files, Model Context Protocol (MCP) server structure, CLI commands, workspace configurations (Fastify backend, React/Vite frontend), and the 12-agent army setup. Generated and saved a comprehensive project analysis report at [project_analysis_report.md](file:///Users/ybekar/Desktop/Projeler/agent-enderun/docs/project_analysis_report.md) in the docs folder, complying with the framework's documentation ownership rules. (Trace 01HGT8J5E2N0W0W0W0W0W0W0W5)
23
+
24
+ Test entry from CLI again.
25
+
26
+ Test entry from CLI
21
27
  - **AL NPM Consumption Fix (v1.0.7+):** Root cause of 'kuraları npm den' AL validation FAILED (the exact error: 'Run manually: node bin/validate-agent-army.js' after init with remap adapters like antigravity) was execSync("node bin/...") assuming source cwd. Fixed by adding robust getPackageRoot() + getValidatorPath() in pkg.ts (walks import.meta.url to locate the agent-enderun package's bin/ regardless of install location or cwd). Updated check.ts, init.ts, index.ts to use resolved path + cwd-respecting exec. Updated error suggestions to `agent-enderun validate`. Reproduced with real npm pack + tgz install into isolated tests/init-adapters/.../consume/, ran installed CLI init+check+validate for antigravity remap case: now ✅ "Agent Army AL validation PASSED" (no FAILED branch). Source validate still 12/12. Docs/README surgically updated. Meets surgical + Trace + every-turn memory. (Trace 01HGT8J5E2N0W0W0W0W0W0W0W5)
22
28
  - **Enterprise v1.0.6 Sürüm Revizyonu:** Mimari Enterprise 2.1 (Yetenek Tabanlı) olarak korundu, marka ismi `Agent Enderun Enterprise v1` olarak güncellendi ve tüm paket sürümleri `1.0.6` olarak mühürlendi.
23
29
  - **Agent Lifecycle (AL) Tam Entegrasyon:** Tüm agent `.md` tanımları `stateMachine` ve `tags` alanları ile AL şemasına uygun hale getirildi. `bin/validate-agent-army.js` aracı bu yeni alanları denetleyecek şekilde güncellendi ve tüm ordu (12 agent) %100 başarıyla doğrulandı. CLI orkestrasyon mantığı AL durum geçişlerini (BRIEFED, EXECUTING, BLOCKED) destekleyecek şekilde zenginleştirildi.
@@ -10,7 +10,7 @@ This directory contains template files for enterprise-grade observability:
10
10
 
11
11
  Per `token_economy_and_memory.md` and corporate governance:
12
12
  - These are **structural placeholders** created during init for regulated/corporate projects.
13
- - Currently low-usage: no active population in core MCP tools or CLI (as of v1.0.8).
13
+ - Currently low-usage: no active population in core MCP tools or CLI (as of v1.0.9).
14
14
  - Intended for future implementation via `@manager` / `@quality` / Hermes flows (see `high-risk-action-approval-flow.md`, `audit-logging-standard.md`).
15
15
  - Load only when building audit/compliance features.
16
16
 
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # 🏛️ Agent Enderun — Enterprise AI Governance & Autonomous Orchestration Framework
2
2
 
3
- > **Stable Release:** v1.0.8 (Final Clean Release) — Low-usage reference items arranged, bloat (KENTİM docs + SYSTEM_MAP) removed. Ready for complex corporate projects.
3
+ > **Stable Release:** v1.0.9 (Final Production Ready) — Build Compile: Clean | Type-Safety: 100% Verified | AL Compliance: 12/12 Agents
4
+
4
5
  > **Author:** Yusuf BEKAR
5
6
  > **Trace ID:** `01HGT8J5E2N0W0W0W0W0W0W0W5`
6
7
  > **System Status:** 🟢 All Systems Operational | Build Compile: Clean | Type-Safety: 100% Verified
@@ -11,7 +12,7 @@
11
12
 
12
13
  **Agent Enderun**, sıradan bir kod şablon üreteci veya basit bir AI asistanı değildir; karmaşık, ölçeklenebilir ve kurumsal (enterprise) düzeydeki yazılım projeleri için özel olarak tasarlanmış bir **Yapay Zeka Yönetişimi ve Otonom Ordu Komuta Sistemidir**.
13
14
 
14
- Nihai temiz sürüm (v1.0.8) itibarıyla sistem; düşük kullanımlı referans materyalleri (knowledge, demo scriptler) düzenlenmiş, bloat temizlenmiş (KENTİM docs seti + SYSTEM_MAP.md kaldırıldı); kendi hafızasını yönetebilen, monorepo proje yollarını dinamik olarak haritalayan, tüm ajan seanslarını güvenli şekilde günlükleyen, farklı yapay zeka ekosistemlerini anayasal bir disiplin altında birleştiren, **Agent Lifecycle (AL) tam uyumlu init ve ordu validasyonunu** (npm kurulumu sonrası dahil) otomatikleştiren ve **macOS & Windows çapraz platform standartlarına tam uyum sağlayan** yaşayan bir mühendislik organizmasıdır. Karmaşık kurumsal projeler için optimize edilmiştir (corporate-governance SOP'ları ile).
15
+ Nihai temiz sürüm (v1.0.9) itibarıyla sistem; düşük kullanımlı referans materyalleri (knowledge, demo scriptler) düzenlenmiş, bloat temizlenmiş (KENTİM docs seti + SYSTEM_MAP.md kaldırıldı); kendi hafızasını yönetebilen, monorepo proje yollarını dinamik olarak haritalayan, tüm ajan seanslarını güvenli şekilde günlükleyen, farklı yapay zeka ekosistemlerini anayasal bir disiplin altında birleştiren, **Agent Lifecycle (AL) tam uyumlu init ve ordu validasyonunu** (npm kurulumu sonrası dahil) otomatikleştiren ve **macOS & Windows çapraz platform standartlarına tam uyum sağlayan** yaşayan bir mühendislik organizmasıdır. Karmaşık kurumsal projeler için optimize edilmiştir (corporate-governance SOP'ları ile).
15
16
 
16
17
  ---
17
18
 
@@ -20,7 +21,7 @@ Nihai temiz sürüm (v1.0.8) itibarıyla sistem; düşük kullanımlı referans
20
21
  Yapay zeka kodlama yardımcıları (Claude Code, Gemini CLI, Grok Build vb.) geliştikçe, kurumsal projelerde kontrolü kaybetmek çok daha kolay hale gelmiştir. Agent Enderun, aşağıdaki kritik **kurumsal problemleri çözmek** amacıyla doğmuştur:
21
22
 
22
23
  1. **Kontrolsüz ve Hatalı Değişiklikler (Rogue AI):** Ajanların tüm kod dosyasını baştan yazmasını engelleyerek **milyonlarca satırlık kodları cerrahi hassasiyetle (`replace_text` / `patch_file` üzerinden)** değiştirmeye zorlar. Token tüketimini ve hata oranını %90 azaltır.
23
- 2. **Kayıp Hafıza ve Bağlam Drifti:** Ajanlar oturum değiştirdikçe projenin geçmişini ve mimari kararlarını unutur. Enderun, **`.enderun/PROJECT_MEMORY.md`** dosyasını projenin değişmez tek doğruluk kaynağı (SSOT) haline getirerek, seanslar arası bağlam kaybını tamamen engeller.
24
+ 2. **Kayıp Hafıza ve Bağlam Drifti:** Ajanlar oturum değiştirdikçe projenin geçmişini ve mimari kararlarını unutur. Enderun, **`.enderun/memory/PROJECT_MEMORY.md`** dosyasını projenin değişmez tek doğruluk kaynağı (SSOT) haline getirerek, seanslar arası bağlam kaybını tamamen engeller.
24
25
  3. **Frontend-Backend Tip Uyuşmazlığı:** Backend tip tanımlamalarında en ufak bir kayma olduğunda, otonom SHA-256 hash hesaplama ve kontrat denetleme motoru (`update-contract` / `verify-contract`) sayesinde arayüz kodları yazılmadan önce hatalar yakalanır.
25
26
  4. **Çoklu Ajan Kaosu:** **12** farklı uzman yapay zeka ajanı, olay tabanlı asenkron bir haberleşme protokolü olan **Hermes Message Broker** üzerinden koordine edilir. Ajanlar birbirine rastgele müdahale edemez; tüm görevler bir İş Dağılım Grafiği (DAG) üzerinden komuta edilir.
26
27
  5. **Sandbox ve Güvenlik Sınırlamaları:** Claude Code gibi modern araçların kernel düzeyindeki güvenlik yalıtımlarını (bubblewrap/seatbelt) ihlal etmemek adına, tüm bellek, kuyruk ve günlük mekanizmaları proje kök klasöründeki lokal adaptör yollarında (**`.enderun/`**, `.gemini/`, `.claude/`, `.grok/` vb.) saklanır; `/tmp` veya dış dizinleri kullanmayarak sıfır hata ile çalışır.
@@ -29,7 +30,7 @@ Yapay zeka kodlama yardımcıları (Claude Code, Gemini CLI, Grok Build vb.) gel
29
30
 
30
31
  ### 📦 Güncel Sürüm / Current Release
31
32
 
32
- **v1.0.7** — AL Enterprise Compliance kararlı sürüm (npm ile kurulum sonrası adapter remap'leri ve validator çağrıları dahil tam destek, cerrahi düzeltmelerle). Detaylı sürüm geçmişi git log ve önceki commit'lerde bulunur; kalıbımız (bilingual TR/EN yapı, tablolar, bölümler) korunmuştur.
33
+ **v1.0.9** — AL Enterprise Compliance kararlı sürüm (npm ile kurulum sonrası adapter remap'leri ve validator çağrıları dahil tam destek, cerrahi düzeltmelerle). Detaylı sürüm geçmişi git log ve önceki commit'lerde bulunur; kalıbımız (bilingual TR/EN yapı, tablolar, bölümler) korunmuştur.
33
34
 
34
35
  ---
35
36
 
@@ -49,18 +50,18 @@ Tüm operasyonlar, uzmanlık alanlarına göre ayrılmış ve Hermes protokolüy
49
50
 
50
51
  | Ajan | Uzmanlık Rolü | Temel Sorumluluğu |
51
52
  | :--- | :--- | :--- |
52
- | **`@manager`** | Komuta & Strateji | Görev dağılımı (DAG), hafıza yönetimi (`PROJECT_MEMORY.md`), anayasa koruyuculuğu. |
53
- | **`@quality`** | Kalite & Test Kapısı | AST zafiyet taramaları, anayasal uyum denetimi, kod inceleme checklistleri, test standartları kapısı, CI/CD kapsam denetimi. |
54
- | **`@database`** | Veritabanı Mimarisi | Veritabanı şemaları, migration kuralları, index optimizasyonları ve veri tohumlama (seeding). |
55
- | **`@backend`** | İş Mantığı (Domain Logic) | API tasarımı, branded types, katmanlı mimari (Route -> Controller -> Service -> Repository), audit günlüğü kontrolü. |
56
- | **`@frontend`** | Akıcı Responsive UI | Panda CSS tasarımı, responsive-first arayüzler, custom React kancaları, rollback disiplini yönetimi. |
57
- | **`@devops`** | Altyapı & Canlı Dağıtım | Native Node.js deploymentları, rollback planları, telemetri ve izleme (monitoring) kurulumları. |
58
- | **`@explorer`** | Kod Analizi & Keşif | Kod tabanı analizi, bağımlılık grafikleri, legacy onboarding stratejileri. |
59
- | **`@git`** | Sürüm Kontrolü | Trace ID uyumlu commit yönetimi, sürüm etiketleme ve dal (branch) hijyeni. |
60
- | **`@mobile`** | Mobil Geliştirme | Expo ve React Native tabanlı mobil arayüz geliştirme otomasyonları. |
61
- | **`@native`** | Native Masaüstü | Tauri ve Electron tabanlı yerel masaüstü uygulama entegrasyonları. |
62
- | **`@security`** | Sistem Güvenliği | Kimlik doğrulamaları, CSP kuralları, API anahtarı rotasyonları ve RLS yetkilendirme kapısı. |
63
- | **`@analyst`** | İş Analizi & Kontrat Sağlığı | Veritabanı kontrat doğrulaması, anayasal uyum denetimi ve bağımsız kalite analizleri. |
53
+ | **`@manager`** | Orchestration & Governance | Görev dağılımı (DAG), hafıza yönetimi (`PROJECT_MEMORY.md`), anayasa koruyuculuğu. |
54
+ | **`@quality`** | Automated Testing & Quality | AST zafiyet taramaları, anayasal uyum denetimi, kod inceleme checklistleri, test standartları kapısı. |
55
+ | **`@database`** | Database Migrations & Tuning | Veritabanı şemaları, migration kuralları, index optimizasyonları ve veri tohumlama (seeding). |
56
+ | **`@backend`** | Domain Logic & Databases | API tasarımı, branded types, katmanlı mimari (Route -> Controller -> Service -> Repository). |
57
+ | **`@frontend`** | Fluid Responsive UI | Panda CSS tasarımı, responsive-first arayüzler, custom React kancaları, rollback disiplini yönetimi. |
58
+ | **`@devops`** | Infrastructure & CI/CD | Native Node.js deploymentları, rollback planları, telemetri ve izleme (monitoring) kurulumları. |
59
+ | **`@explorer`** | Codebase Discovery | Kod tabanı analizi, bağımlılık grafikleri, legacy onboarding stratejileri. |
60
+ | **`@git`** | Version Control | Trace ID uyumlu commit yönetimi, sürüm etiketleme ve dal (branch) hijyeni. |
61
+ | **`@mobile`** | Mobile App | Expo ve React Native tabanlı mobil arayüz geliştirme otomasyonları. |
62
+ | **`@native`** | Native OS Integration | Tauri ve Electron tabanlı yerel masaüstü uygulama entegrasyonları. |
63
+ | **`@security`** | Security & Cryptography | Kimlik doğrulamaları, CSP kuralları, API anahtarı rotasyonları ve RLS yetkilendirme kapısı. |
64
+ | **`@analyst`** | Contract Verification | Veritabanı kontrat doğrulaması, anayasal uyum denetimi ve bağımsız kalite analizleri. |
64
65
 
65
66
  ---
66
67
 
@@ -70,7 +71,7 @@ Agent Enderun, otonom yazılım geliştirme süreçlerinde **bağlam driftini (c
70
71
 
71
72
  #### A. Katmanlı Bellek Modeli (Tiered Memory Model)
72
73
  Sistem, projenin ortak aklını ve ajanların özel seans bağlamlarını 3 farklı katmanda saklar:
73
- 1. **Ortak Proje Hafızası (`.enderun/PROJECT_MEMORY.md`):** Aktif fazı, benzersiz Trace ID'yi, kritik mimari kararları ve ordu çapındaki aktif görevleri (DAG) tutan projenin ortak SSOT beynidir.
74
+ 1. **Ortak Proje Hafızası (`.enderun/memory/PROJECT_MEMORY.md`):** Aktif fazı, benzersiz Trace ID'yi, kritik mimari kararları ve ordu çapındaki aktif görevleri (DAG) tutan projenin ortak SSOT beynidir.
74
75
  2. **Paylaşılan Genel Gerçekler (`memory-graph/shared-facts.json`):** Teknolojik stack tercihleri, aktif kodlama politikaları ve kontrat hash adresleri gibi statik verileri barındırır.
75
76
  3. **Özel Ajan Bellekleri (`memory-graph/agent-contexts/{agent}.json`):** Her uzman ajanın kendi geçmiş seans özetlerini, üstlendiği kararları ve üzerinde çalıştığı aktif geliştirme detaylarını tutan yalıtılmış bellek hücreleridir.
76
77
 
@@ -165,7 +166,7 @@ npx agent-enderun init gemini --unified
165
166
 
166
167
  **Agent Enderun** is not a generic boilerplate generator or a simple AI wrapper; it is an elite, state-of-the-art **AI Governance and Autonomous Army Command System** designed for complex, scalable, and highly auditable enterprise software projects.
167
168
 
168
- Nihai temiz sürüm (v1.0.8 - Final Clean Release) operates as a **"Living Engineering Organism"** capable of managing its own persistent memory, dynamically mapping project directory scopes, secure-logging expert agent activities, **automatically enforcing Agent Lifecycle (AL) compliance on every init** (including after `npm install`), and **fully complying with cross-platform (macOS & Windows) scripting and standard setups**. Low-usage reference materials arranged (knowledge files, demo scripts, observability placeholders marked). Bloat removed. Optimized for complex corporate/enterprise projects via corporate-governance knowledge and SOPs.
169
+ Nihai temiz sürüm (v1.0.9 - Final Clean Release) operates as a **"Living Engineering Organism"** capable of managing its own persistent memory, dynamically mapping project directory scopes, secure-logging expert agent activities, **automatically enforcing Agent Lifecycle (AL) compliance on every init** (including after `npm install`), and **fully complying with cross-platform (macOS & Windows) scripting and standard setups**. Low-usage reference materials arranged (knowledge files, demo scripts, observability placeholders marked). Bloat removed. Optimized for complex corporate/enterprise projects via corporate-governance knowledge and SOPs.
169
170
 
170
171
  ---
171
172
 
@@ -174,7 +175,7 @@ Nihai temiz sürüm (v1.0.8 - Final Clean Release) operates as a **"Living Engin
174
175
  As AI coding assistants (Claude Code, Gemini CLI, Grok Build, etc.) become increasingly powerful, software projects are prone to rapid architectural drift and token wastage. Agent Enderun solves these critical **enterprise AI challenges**:
175
176
 
176
177
  1. **Rogue AI Prevention (Surgical Edits):** It strictly prohibits agents from rewriting entire files. Instead, it forces them to execute micro-targeted changes via **`replace_text` / `patch_file` tools**, reducing API token consumption by up to 90%.
177
- 2. **Context Loss Prevention (SSOT Memory):** AI agents naturally lose project history across chats. Enderun seals all project milestones, decisions, and tasks into a self-pruning **`.enderun/PROJECT_MEMORY.md`** file, ensuring absolute context continuity.
178
+ 2. **Context Loss Prevention (SSOT Memory):** AI agents naturally lose project history across chats. Enderun seals all project milestones, decisions, and tasks into a self-pruning **`.enderun/memory/PROJECT_MEMORY.md`** file, ensuring absolute context continuity.
178
179
  3. **Contract-First Safety (Frontend-Backend Drift):** Before any user interface code is written, API models and branded types are sealed. The **autonomous** contract verification engine checks SHA-256 type definitions to prevent integration drifts.
179
180
  4. **Symmetric Orchestration (Hermes Protocol):** **12** specialized expert agents communicate via an asynchronous, event-driven message broker (**Hermes**), preventing chaotic, uncoordinated AI behavior.
180
181
  5. **Sandbox & Security Compliance:** Modern CLI agents (like Claude Code) restrict filesystem access. By keeping all configurations, task logs, and queues local (inside **`.enderun/`**, `.gemini/`, `.claude/`, `.grok/`, etc.) in the project workspace, Enderun runs with **zero sandbox violations**.
@@ -183,7 +184,7 @@ As AI coding assistants (Claude Code, Gemini CLI, Grok Build, etc.) become incre
183
184
 
184
185
  ### 📦 Current Release / Güncel Sürüm
185
186
 
186
- **v1.0.7** — AL Enterprise Compliance stable (full cross-adapter & npm install support for remaps + validator resolution, with surgical fixes). Detailed historical release notes are in git history; the bilingual TR/EN template, tables, and section mold are preserved.
187
+ **v1.0.9** — AL Enterprise Compliance stable (full cross-adapter & npm install support for remaps + validator resolution, with surgical fixes). Detailed historical release notes are in git history; the bilingual TR/EN template, tables, and section mold are preserved.
187
188
 
188
189
  ---
189
190
 
@@ -203,18 +204,18 @@ All workspace operations are divided among 12 specialized expert agents connecte
203
204
 
204
205
  | Agent | Specialization Role | Core Responsibility |
205
206
  | :--- | :--- | :--- |
206
- | **`@manager`** | Command & Strategy | Task dependency graphs (DAG), memory pruning (`PROJECT_MEMORY.md`), constitution compliance. |
207
- | **`@quality`** | Quality & Test Gate | AST vulnerability scanning, constitutional audits, code review checklists, test standard gates, CI/CD coverage verification. |
208
- | **`@database`** | Database Architecture | Database schemas, migration workflows, query optimization, and contract-aware seeding. |
209
- | **`@backend`** | Domain Logic Specialist | API route design, branded types, layered architecture (Route -> Controller -> Service -> Repository), audit logging scan. |
207
+ | **`@manager`** | Orchestration & Governance | Task dependency graphs (DAG), memory pruning (`PROJECT_MEMORY.md`), constitution compliance. |
208
+ | **`@quality`** | Automated Testing & Quality | AST vulnerability scanning, constitutional audits, code review checklists, test standard gates. |
209
+ | **`@database`** | Database Migrations & Tuning | Database schemas, migration workflows, query optimization, and contract-aware seeding. |
210
+ | **`@backend`** | Domain Logic & Databases | API route design, branded types, layered architecture (Route -> Controller -> Service -> Repository). |
210
211
  | **`@frontend`** | Fluid Responsive UI | Panda CSS design, responsive-first interfaces, customized React hooks, rollback discipline management. |
211
- | **`@devops`** | Infrastructure Specialist | Native Node.js deployments, rollback plans, monitoring & logging setups. |
212
+ | **`@devops`** | Infrastructure & CI/CD | Native Node.js deployments, rollback plans, monitoring & logging setups. |
212
213
  | **`@explorer`** | Codebase Intelligence | Project analysis, dependency graph generation, legacy conversion strategies. |
213
214
  | **`@git`** | Version Control | Semantic Trace-ID-aligned commits, branch hygiene. |
214
- | **`@mobile`** | Mobile Development | React Native / Expo UI automation and native builds. |
215
- | **`@native`** | Desktop Engineering | Tauri and Electron desktop app integrations. |
216
- | **`@security`** | System Security | Security credentials, CSP configurations, API key rotations, and RLS authorization gate. |
217
- | **`@analyst`** | Requirement Analysis & Contract Health | Database contract verification, constitutional compliance audits, and independent quality analysis. |
215
+ | **`@mobile`** | Mobile App | React Native / Expo UI automation and native builds. |
216
+ | **`@native`** | Native OS Integration | Tauri and Electron desktop app integrations. |
217
+ | **`@security`** | Security & Cryptography | Security credentials, CSP configurations, API key rotations, and RLS authorization gate. |
218
+ | **`@analyst`** | Contract Verification | Database contract verification, constitutional compliance audits, and independent quality analysis. |
218
219
 
219
220
  ---
220
221
 
@@ -224,7 +225,7 @@ Agent Enderun utilizes a strongly-disciplined **Tiered Memory Model** and **Toke
224
225
 
225
226
  #### A. The Tiered Memory Model
226
227
  The framework manages shared project knowledge and isolated specialist history across 3 robust layers:
227
- 1. **Shared Project Memory (`.enderun/PROJECT_MEMORY.md`):** The project's shared SSOT (Single Source of Truth) brain containing the active phase, unique Trace ID, critical architectural decisions, and the army's active DAG tasks.
228
+ 1. **Shared Project Memory (`.enderun/memory/PROJECT_MEMORY.md`):** The project's shared SSOT (Single Source of Truth) brain containing the active phase, unique Trace ID, critical architectural decisions, and the army's active DAG tasks.
228
229
  2. **Shared General Facts (`memory-graph/shared-facts.json`):** Holds static declarations including the active technology stack, core policies, and sealed contract version hashes.
229
230
  3. **Private Agent Contexts (`memory-graph/agent-contexts/{agent}.json`):** Sandboxed memory files storing the recent execution state, specific choices, and targeted tasks completed by each specialist.
230
231
 
@@ -315,4 +316,4 @@ npx agent-enderun init gemini --unified
315
316
 
316
317
  ---
317
318
 
318
- Developed with absolute discipline | Developer **Yusuf BEKAR** | Framework Version **v1.0.8 (Final Clean)** — Low-usage items arranged as reference-only. Bloat removed. Corporate-ready.
319
+ Developed with absolute discipline | Developer **Yusuf BEKAR** | Framework Version **v1.0.9 (Final Clean)** — Low-usage items arranged as reference-only. Bloat removed. Corporate-ready.
package/agent.md CHANGED
@@ -14,7 +14,7 @@ You are operating under the Agent Enderun governance framework.
14
14
 
15
15
  At the **start of every session**, before any work:
16
16
  1. **Restore Memory:** Read `.enderun/PROJECT_MEMORY.md` to restore state, active Trace ID, and history.
17
- 2. **Load Identity:** Read the relevant agent definition under `.enderun/agents/{agent}.md` (default to `@manager`).
17
+ 2. **Load Identity:** Read the relevant agent definition under `.enderun/agents/{agent}.json` (default to `@manager`).
18
18
  3. **Internalize Knowledge:** Reference the `.enderun/knowledge/` base for architectural and coding standards.
19
19
 
20
20
  ### 🛡️ Core Mandates
@@ -16,10 +16,6 @@
16
16
  * - Scenario 1: Autonomous task delegation.
17
17
  * - Scenario 2: High-risk admin action block & managerApproval injection.
18
18
  */
19
- * Demonstrates:
20
- * - Scenario 1: Autonomous task delegation.
21
- * - Scenario 2: High-risk admin action block & managerApproval injection.
22
- */
23
19
 
24
20
  import fs from "fs";
25
21
  import path from "path";
package/bin/init-check.js CHANGED
@@ -11,7 +11,6 @@
11
11
 
12
12
  import fs from "fs";
13
13
  import path from "path";
14
- import path from "path";
15
14
 
16
15
  const targetDir = process.cwd();
17
16
 
@@ -8,26 +8,24 @@ import path from "path";
8
8
  * - .enderun/agents/ or .agent/skills/ or .grok/plugins/ etc.
9
9
  */
10
10
  const AGENT_FOLDER_NAMES = ["agents", "skills", "plugins"];
11
-
12
11
  const FRAMEWORK_CANDIDATES = [
12
+ ".enderun",
13
13
  ".gemini/antigravity",
14
14
  ".gemini/antigravity-cli",
15
15
  ".gemini",
16
16
  ".claude",
17
17
  ".grok",
18
18
  ".agent",
19
- ".enderun",
20
- ".agents",
21
- ".cursor",
19
+ ".agents"
22
20
  ];
23
21
 
24
22
  /**
25
23
  * Robust detection that works no matter which adapter was used with `init`.
26
- * Returns the actual location of the army .md files + the army schema.
27
24
  */
28
25
  function detectFrameworkDir() {
26
+ const projectRoot = process.cwd();
29
27
  for (const dir of FRAMEWORK_CANDIDATES) {
30
- const dirPath = path.resolve(dir);
28
+ const dirPath = path.resolve(projectRoot, dir);
31
29
  if (!fs.existsSync(dirPath)) continue;
32
30
 
33
31
  for (const folderName of AGENT_FOLDER_NAMES) {
@@ -53,33 +51,23 @@ function detectFrameworkDir() {
53
51
  return { frameworkDir: dir, agentsDir: agentsPath, schemaPath };
54
52
  }
55
53
  }
56
-
57
- // Rare: .md files directly in the framework root
58
- const directMds = fs.readdirSync(dirPath).filter(f => f.endsWith(".md") && !f.startsWith("AGENTS"));
59
- if (directMds.length > 0) {
60
- const schemaPath = path.join(dirPath, "agent_army_schema.json");
61
- if (fs.existsSync(schemaPath)) {
62
- return { frameworkDir: dir, agentsDir: dirPath, schemaPath };
63
- }
64
- }
65
54
  }
66
55
  return null;
67
56
  }
68
57
 
69
- function findSchemaRecursive(startDir) {
58
+ function findSchemaRecursive(dirPath) {
70
59
  try {
71
- const entries = fs.readdirSync(startDir, { withFileTypes: true });
60
+ const entries = fs.readdirSync(dirPath, { withFileTypes: true });
72
61
  for (const entry of entries) {
73
- const full = path.join(startDir, entry.name);
74
- if (entry.isDirectory()) {
75
- if (entry.name === "node_modules" || entry.name === "dist") continue;
62
+ const full = path.join(dirPath, entry.name);
63
+ if (entry.isDirectory() && !entry.name.startsWith(".")) {
76
64
  const found = findSchemaRecursive(full);
77
65
  if (found) return found;
78
66
  } else if (entry.name === "agent_army_schema.json") {
79
67
  return full;
80
68
  }
81
69
  }
82
- } catch {}
70
+ } catch { /* ignore: non-critical file system access issues during recursive search */ }
83
71
  return null;
84
72
  }
85
73
 
@@ -89,98 +77,52 @@ if (!detected) {
89
77
  process.exit(1);
90
78
  }
91
79
 
92
- const { frameworkDir, agentsDir, schemaPath } = detected;
93
-
94
- console.log(`🛡️ STARTING AUTOMATED AGENT ARMY VALIDATION (${frameworkDir})...`);
95
- console.log(` Agents: ${agentsDir}`);
96
- console.log(` Schema: ${schemaPath}`);
80
+ const { agentsDir, schemaPath } = detected;
97
81
 
98
82
  try {
99
- const schema = JSON.parse(fs.readFileSync(schemaPath, "utf8"));
100
- const requiredKeys = schema.required || ["name", "description"];
83
+ fs.readFileSync(schemaPath, "utf8");
101
84
  const files = fs.readdirSync(agentsDir);
85
+
102
86
  let totalFailed = 0;
103
87
 
88
+ console.log(`🛡️ STARTING AUTOMATED AGENT ARMY VALIDATION (${detected.frameworkDir})...`);
89
+ console.log(` Agents: ${agentsDir}`);
90
+ console.log(` Schema: ${schemaPath}`);
104
91
  console.log("--------------------------------------------------");
105
92
  console.log("| Agent ID | Status | Score | Category |");
106
93
  console.log("--------------------------------------------------");
107
94
 
108
95
  for (const fileName of files) {
109
- if (!fileName.endsWith(".md")) continue;
96
+ if (fileName === "agent_army_schema.json") continue;
97
+ if (!fileName.endsWith(".json")) continue;
98
+
110
99
  const filePath = path.join(agentsDir, fileName);
111
100
  const content = fs.readFileSync(filePath, "utf8");
112
101
 
113
- const match = content.match(/^---\n([\s\S]*?)\n---/);
114
- if (!match) {
115
- console.log(`| ${fileName.padEnd(9)} | ❌ NO YAML | ----- | ---------------- |`);
102
+ let agent;
103
+ try {
104
+ agent = JSON.parse(content);
105
+ } catch (e) {
106
+ console.log(`| ${fileName.padEnd(9)} | ❌ INVALID JSON | ----- | ${String(e).slice(0, 16)} |`);
116
107
  totalFailed++;
117
108
  continue;
118
109
  }
119
110
 
120
- const yamlContent = match[1];
121
- const agent = {};
122
- yamlContent.split("\n").forEach((line) => {
123
- const [key, ...valParts] = line.split(":");
124
- if (key && valParts.length > 0) {
125
- const k = key.trim();
126
- let val = valParts.join(":").trim();
127
- if (val.startsWith("[") && val.endsWith("]")) {
128
- try { val = JSON.parse(val.replace(/'/g, "\"")); } catch { /* ignore */ }
129
- } else if (val === "") {
130
- val = {};
131
- }
132
- if (typeof val === "string" && !isNaN(val) && val !== "") {
133
- agent[k] = Number(val);
134
- } else {
135
- agent[k] = val;
136
- }
137
- }
138
- });
139
-
140
- // AL fields (stateMachine + tags) – the key part of this validator
141
- if (yamlContent.includes("stateMachine:") && yamlContent.includes("schemaRef:")) {
142
- const schemaMatch = yamlContent.match(/schemaRef:\s*"(.*)"/);
143
- if (schemaMatch) {
144
- agent.stateMachine = { schemaRef: schemaMatch[1] };
145
- }
146
- }
147
-
148
- if (typeof agent.tags === "string" && agent.tags.startsWith("[")) {
149
- try { agent.tags = JSON.parse(agent.tags.replace(/'/g, "\"")); } catch { /* ignore */ }
150
- }
151
-
152
- if (agent.name === undefined) {
153
- const nameMatch = yamlContent.match(/name:\s*(.*)/);
154
- if (nameMatch) agent.name = nameMatch[1].trim().replace(/^['"]|['"]$/g, "");
155
- }
156
-
157
- // Registry cross-check (optional but nice)
158
- const registryPath = path.resolve(frameworkDir, "registry/agents.yaml");
159
- let registryApproved = true;
160
- if (fs.existsSync(registryPath)) {
161
- const registry = fs.readFileSync(registryPath, "utf8");
162
- if (!registry.includes(`name: ${agent.name}`)) {
163
- registryApproved = false;
164
- }
165
- }
166
-
167
- const missing = requiredKeys.filter((k) => agent[k] === undefined);
168
- if (!registryApproved) missing.push("Registry (not found)");
169
-
170
- if (agent.stateMachine && typeof agent.stateMachine !== "object") {
171
- missing.push("stateMachine (invalid)");
172
- }
173
- if (!agent.tags || !Array.isArray(agent.tags)) {
174
- missing.push("tags (missing)");
175
- }
111
+ // Validate basic required fields for AL compliance
112
+ const missing = [];
113
+ if (!agent.name) missing.push("name");
114
+ if (!agent.role) missing.push("role");
115
+ if (agent.capability === undefined) missing.push("capability");
116
+ if (!agent.stateMachine || !agent.stateMachine.schemaRef) missing.push("stateMachine");
117
+ if (!agent.tags || !Array.isArray(agent.tags)) missing.push("tags");
176
118
 
177
119
  if (missing.length > 0) {
178
- console.log(`| ${fileName.replace(".md", "").padEnd(9)} | ❌ FAILED | ----- | ${missing.join(",").slice(0, 16)} |`);
120
+ console.log(`| ${fileName.padEnd(9)} | ❌ FAILED | ----- | ${missing.join(",").slice(0, 15)} |`);
179
121
  totalFailed++;
180
122
  } else {
181
- const displayCap = agent.capability || "-";
182
- const displayRole = (agent.role || agent.name || "").substring(0, 14);
183
- console.log(`| ${agent.name.padEnd(9)} | ✅ PASSED | ${String(displayCap).padEnd(5)} | ${displayRole.padEnd(14)} |`);
123
+ const category = (agent.tags[0] || "core").padEnd(14);
124
+ const score = String(agent.capability || 0).padStart(5);
125
+ console.log(`| ${agent.name.padEnd(9)} | ✅ PASSED | ${score} | ${category} |`);
184
126
  }
185
127
  }
186
128
 
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Agent Enderun Shared Contracts
3
+ */
4
+ export type UserID = string & {
5
+ __brand: "UserID";
6
+ };
7
+ export type TraceID = string & {
8
+ __brand: "TraceID";
9
+ };