kortext 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/README.md +159 -139
  2. package/agents/architect.md +85 -0
  3. package/agents/compliance-expert.md +36 -75
  4. package/agents/copywriter.md +36 -92
  5. package/agents/db-admin.md +43 -91
  6. package/agents/designer.md +40 -77
  7. package/agents/devops-engineer.md +37 -113
  8. package/agents/growth-expert.md +45 -88
  9. package/agents/product-manager.md +38 -83
  10. package/agents/qa-engineer.md +51 -99
  11. package/agents/security-engineer.md +47 -92
  12. package/bin/kortext.js +1 -22
  13. package/dist/app.js +829 -0
  14. package/dist/cli-spawn.js +137 -0
  15. package/dist/daemon.js +40 -0
  16. package/dist/db.js +78 -0
  17. package/dist/design-preview.js +533 -0
  18. package/dist/docs.js +701 -0
  19. package/dist/engines.js +225 -0
  20. package/dist/index.js +109 -0
  21. package/dist/pick-directory.js +38 -0
  22. package/dist/projects.js +189 -0
  23. package/dist/readiness.js +288 -0
  24. package/dist/runner.js +771 -0
  25. package/dist/update.js +55 -0
  26. package/docs/CHANGELOG.md +11 -0
  27. package/package.json +25 -57
  28. package/templates/AGENTS.md +62 -0
  29. package/templates/docs/API.md +67 -0
  30. package/templates/docs/ARCHITECTURE.md +31 -0
  31. package/templates/docs/BRIEF.md +27 -0
  32. package/templates/docs/CONTENT.md +66 -0
  33. package/templates/docs/DATABASE.md +63 -0
  34. package/templates/docs/DESIGN.md +124 -0
  35. package/templates/docs/ENGINEERING.md +66 -0
  36. package/templates/docs/ENVIRONMENT.md +102 -0
  37. package/templates/docs/GROWTH.md +44 -0
  38. package/templates/docs/LEGAL.md +48 -0
  39. package/templates/docs/PRODUCT.md +43 -0
  40. package/templates/docs/SECURITY.md +65 -0
  41. package/templates/docs/STACK.md +57 -0
  42. package/templates/docs/STRUCTURE.md +73 -0
  43. package/templates/docs/TEST.md +62 -0
  44. package/ui/dist/assets/abnfDiagram-VCTEODGH-Bm7Q2BML.js +1 -0
  45. package/ui/dist/assets/arc-BV9hs0Hu.js +1 -0
  46. package/ui/dist/assets/architecture-7GRP2DOG-RckR3gBI.js +1 -0
  47. package/ui/dist/assets/architectureDiagram-5GKGNRK7-CHiJ6JFT.js +36 -0
  48. package/ui/dist/assets/array-BifhSqXX.js +1 -0
  49. package/ui/dist/assets/blockDiagram-I7D4REHJ-qCbaKVhd.js +129 -0
  50. package/ui/dist/assets/c4Diagram-7LVT6UL2-DidCDJrv.js +38 -0
  51. package/ui/dist/assets/channel-CNUQ11ne.js +1 -0
  52. package/ui/dist/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
  53. package/ui/dist/assets/chunk-4HAMMTFA-CDGFjfVp.js +62 -0
  54. package/ui/dist/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
  55. package/ui/dist/assets/chunk-75Z2AOVW-CbNT4sDh.js +2 -0
  56. package/ui/dist/assets/chunk-DU6HZSFF-Cq2BVv26.js +127 -0
  57. package/ui/dist/assets/chunk-F27PBJKO-CE365m0v.js +1 -0
  58. package/ui/dist/assets/chunk-FOHPRMQF-DHwB1DNv.js +161 -0
  59. package/ui/dist/assets/chunk-GMAD6QVW-DxWL1VC-.js +72 -0
  60. package/ui/dist/assets/chunk-GVQU2GXP-aARV8YbK.js +1 -0
  61. package/ui/dist/assets/chunk-IMKFNOWR-CC790Kt2.js +231 -0
  62. package/ui/dist/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
  63. package/ui/dist/assets/chunk-L3NEJ4N5-BfE4VE8J.js +1 -0
  64. package/ui/dist/assets/chunk-OSK3NFVY-BImQbSWH.js +10 -0
  65. package/ui/dist/assets/chunk-P2QGCYS3-CN3XD313.js +1 -0
  66. package/ui/dist/assets/chunk-POPQ4Y6H-Dqb6jOrX.js +1 -0
  67. package/ui/dist/assets/chunk-PWAF6VOD-DfXX6rBk.js +1 -0
  68. package/ui/dist/assets/chunk-SHT3W25Y-DATyyqPK.js +168 -0
  69. package/ui/dist/assets/chunk-SVP7TREG-r1chwRmg.js +88 -0
  70. package/ui/dist/assets/chunk-TICWLB2K-DL4atHUC.js +206 -0
  71. package/ui/dist/assets/chunk-XXDRQBXY-DXrM6jh7.js +1 -0
  72. package/ui/dist/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
  73. package/ui/dist/assets/classDiagram-ZZMXUADV-BpQxfIQ7.js +1 -0
  74. package/ui/dist/assets/classDiagram-v2-VYDZK3BY-BpQxfIQ7.js +1 -0
  75. package/ui/dist/assets/cose-bilkent-JH36ORCC-Bhe-ZBlS.js +1 -0
  76. package/ui/dist/assets/cynefin-OW5HDTMX-D1koLd-G.js +1 -0
  77. package/ui/dist/assets/cynefinDiagram-5FMLGOSQ-BMcw40hV.js +62 -0
  78. package/ui/dist/assets/cytoscape.esm-CGd-uY3x.js +321 -0
  79. package/ui/dist/assets/dagre-GXQ25YYZ-DBun-Rs2.js +4 -0
  80. package/ui/dist/assets/dagre-PrKaheQc.js +1 -0
  81. package/ui/dist/assets/defaultLocale-BFoDCU3G.js +1 -0
  82. package/ui/dist/assets/diagram-S7CK7UJ4-C1fUIGvo.js +30 -0
  83. package/ui/dist/assets/diagram-UQ7AKVKN-B5FDfkvB.js +41 -0
  84. package/ui/dist/assets/diagram-VSXAHHWV-CCIpOCNC.js +3 -0
  85. package/ui/dist/assets/diagram-VX7I27RA-DV0q2xo_.js +24 -0
  86. package/ui/dist/assets/diagram-Z3DM3KII-B3LCdNgI.js +24 -0
  87. package/ui/dist/assets/dist-EcW76Zvr.js +1 -0
  88. package/ui/dist/assets/ebnfDiagram-PWID7BFC-De_oRbYe.js +1 -0
  89. package/ui/dist/assets/erDiagram-RLTQ6QDP-B9NikMr1.js +99 -0
  90. package/ui/dist/assets/eventmodeling-NTZA5JFV-DZ4t581k.js +1 -0
  91. package/ui/dist/assets/flowDiagram-HODETNUW-DuTOJp1C.js +1 -0
  92. package/ui/dist/assets/ganttDiagram-EL5Y4UJY-BVTqqlPw.js +292 -0
  93. package/ui/dist/assets/gitGraph-4MIJSDKK-xRFaEJdZ.js +1 -0
  94. package/ui/dist/assets/gitGraphDiagram-WWUBYQGX-CK5_GCmX.js +106 -0
  95. package/ui/dist/assets/graphlib-DS17s2tU.js +1 -0
  96. package/ui/dist/assets/index-CjkpNftW.js +46 -0
  97. package/ui/dist/assets/index-DVIDTWin.css +1 -0
  98. package/ui/dist/assets/info-A6RAGUB7-Dg7z-CTI.js +1 -0
  99. package/ui/dist/assets/infoDiagram-27XIBGKW-YaqsOXh0.js +2 -0
  100. package/ui/dist/assets/init-C-OQMol4.js +1 -0
  101. package/ui/dist/assets/ishikawaDiagram-5VMMS53U-C-wtxZPa.js +70 -0
  102. package/ui/dist/assets/journeyDiagram-3NMN7TZE-DsXSXf16.js +139 -0
  103. package/ui/dist/assets/kanban-definition-UXKFOSKX-Ct59fuWk.js +89 -0
  104. package/ui/dist/assets/katex-CXMH3UgJ.js +257 -0
  105. package/ui/dist/assets/line-BUVw9Mhs.js +1 -0
  106. package/ui/dist/assets/linear-D8ncLO0X.js +1 -0
  107. package/ui/dist/assets/mermaid-parser.core-BDC4bG-O.js +7 -0
  108. package/ui/dist/assets/mermaid.core-DZY3WwzX.js +44 -0
  109. package/ui/dist/assets/mindmap-definition-YA3MSWOX-DtiuF6Ce.js +96 -0
  110. package/ui/dist/assets/ordinal-BDEzSJ7C.js +1 -0
  111. package/ui/dist/assets/packet-AYTQ26CC-BX2-w9rD.js +1 -0
  112. package/ui/dist/assets/path-fybaL0A-.js +1 -0
  113. package/ui/dist/assets/pegDiagram-XKGWAZYB-CotwuIHB.js +1 -0
  114. package/ui/dist/assets/pie-WAS4IAKB-Hth8ZVpm.js +1 -0
  115. package/ui/dist/assets/pieDiagram-E7YTZNPT-D9-INs8B.js +39 -0
  116. package/ui/dist/assets/quadrantDiagram-AXDQQJYC-CMtBXZGV.js +7 -0
  117. package/ui/dist/assets/radar-RG4KPBEZ-6UuwQPsw.js +1 -0
  118. package/ui/dist/assets/railroad-74A4TZTK-BF5TZgj0.js +1 -0
  119. package/ui/dist/assets/railroad-abnf-HS5TGJTU-3KYovtYT.js +1 -0
  120. package/ui/dist/assets/railroad-ebnf-LZEXJU2U-DeP4WedE.js +1 -0
  121. package/ui/dist/assets/railroad-peg-WCYAUIDC-i42N1-yk.js +1 -0
  122. package/ui/dist/assets/railroadDiagram-O6MQD6OU-BS6zkU3Z.js +1 -0
  123. package/ui/dist/assets/requirementDiagram-BXWQKSXE-J4IOB-kP.js +84 -0
  124. package/ui/dist/assets/rough.esm-Dy-Kn_BL.js +1 -0
  125. package/ui/dist/assets/sankeyDiagram-P5KCCOFB-jYTCuYzQ.js +40 -0
  126. package/ui/dist/assets/sequenceDiagram-WJ2MYXX4-Cd2r6PW-.js +162 -0
  127. package/ui/dist/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
  128. package/ui/dist/assets/src-7TsfZXRO.js +1 -0
  129. package/ui/dist/assets/stateDiagram-D77RDMKH-DXOdtOKe.js +1 -0
  130. package/ui/dist/assets/stateDiagram-v2-MP3YSRHH-9h7sIf3R.js +1 -0
  131. package/ui/dist/assets/swimlanes-42K2YHIH-BvJGmGs1.js +1 -0
  132. package/ui/dist/assets/swimlanesDiagram-VR7AAH4N-QA4gPi6a.js +8 -0
  133. package/ui/dist/assets/timeline-definition-24CTP7MA-CAaD6-yd.js +120 -0
  134. package/ui/dist/assets/treeView-Q6P3EWNA-4gDEXIyJ.js +1 -0
  135. package/ui/dist/assets/treemap-WGGIJYW6-CGel5TwW.js +1 -0
  136. package/ui/dist/assets/vennDiagram-4TSXK5OY-DpxsKboL.js +34 -0
  137. package/ui/dist/assets/wardley-WFR3VGLG-Ck38v5ns.js +1 -0
  138. package/ui/dist/assets/wardleyDiagram-VM6X3IG4-Ba0grrqs.js +78 -0
  139. package/ui/dist/assets/xychartDiagram-S5SC5T6Z-DH_gC96K.js +7 -0
  140. package/ui/dist/index.html +13 -0
  141. package/ui/dist/kortext-logo-dark.svg +41 -0
  142. package/ui/dist/kortext-logo.svg +41 -0
  143. package/workflows/existing-project-analysis.md +87 -0
  144. package/workflows/new-project-analysis.md +98 -0
  145. package/workflows/planning-pipeline.md +61 -0
  146. package/AGENTS.md +0 -24
  147. package/CHANGELOG.md +0 -81
  148. package/USER-GUIDE.md +0 -505
  149. package/agents/backend-developer.md +0 -132
  150. package/agents/delivery-manager.md +0 -121
  151. package/agents/engineering-manager.md +0 -208
  152. package/agents/frontend-developer.md +0 -174
  153. package/agents/operation-manager.md +0 -122
  154. package/bin/kortext.ts +0 -377
  155. package/dist/bin/kortext.js +0 -346
  156. package/dist/bin/kortext.js.map +0 -1
  157. package/dist/mcp/index.js +0 -4
  158. package/dist/mcp/index.js.map +0 -1
  159. package/dist/mcp/server.js +0 -553
  160. package/dist/mcp/server.js.map +0 -1
  161. package/dist/mcp/sse.js +0 -38
  162. package/dist/mcp/sse.js.map +0 -1
  163. package/dist/mcp/stdio.js +0 -44
  164. package/dist/mcp/stdio.js.map +0 -1
  165. package/dist/server/cli/cleanup.js +0 -73
  166. package/dist/server/cli/cleanup.js.map +0 -1
  167. package/dist/server/cli/commands.js +0 -73
  168. package/dist/server/cli/commands.js.map +0 -1
  169. package/dist/server/cli/doctor.js +0 -118
  170. package/dist/server/cli/doctor.js.map +0 -1
  171. package/dist/server/cli/executor-factory.js +0 -39
  172. package/dist/server/cli/executor-factory.js.map +0 -1
  173. package/dist/server/cli/init.js +0 -121
  174. package/dist/server/cli/init.js.map +0 -1
  175. package/dist/server/cli/logs.js +0 -28
  176. package/dist/server/cli/logs.js.map +0 -1
  177. package/dist/server/cli/serve.js +0 -72
  178. package/dist/server/cli/serve.js.map +0 -1
  179. package/dist/server/config/env.js +0 -12
  180. package/dist/server/config/env.js.map +0 -1
  181. package/dist/server/db/client.js +0 -32
  182. package/dist/server/db/client.js.map +0 -1
  183. package/dist/server/db/json.js +0 -21
  184. package/dist/server/db/json.js.map +0 -1
  185. package/dist/server/db/migrate.js +0 -70
  186. package/dist/server/db/migrate.js.map +0 -1
  187. package/dist/server/db/migrations/001_init.sql +0 -243
  188. package/dist/server/db/repositories/audit-log.js +0 -58
  189. package/dist/server/db/repositories/audit-log.js.map +0 -1
  190. package/dist/server/db/repositories/backlog.js +0 -96
  191. package/dist/server/db/repositories/backlog.js.map +0 -1
  192. package/dist/server/db/repositories/contexts.js +0 -54
  193. package/dist/server/db/repositories/contexts.js.map +0 -1
  194. package/dist/server/db/repositories/decisions.js +0 -71
  195. package/dist/server/db/repositories/decisions.js.map +0 -1
  196. package/dist/server/db/repositories/handovers.js +0 -53
  197. package/dist/server/db/repositories/handovers.js.map +0 -1
  198. package/dist/server/db/repositories/index.js +0 -30
  199. package/dist/server/db/repositories/index.js.map +0 -1
  200. package/dist/server/db/repositories/locks.js +0 -59
  201. package/dist/server/db/repositories/locks.js.map +0 -1
  202. package/dist/server/db/repositories/notifications.js +0 -63
  203. package/dist/server/db/repositories/notifications.js.map +0 -1
  204. package/dist/server/db/repositories/pending-questions.js +0 -63
  205. package/dist/server/db/repositories/pending-questions.js.map +0 -1
  206. package/dist/server/db/repositories/runs.js +0 -138
  207. package/dist/server/db/repositories/runs.js.map +0 -1
  208. package/dist/server/db/repositories/runtime-artifacts.js +0 -39
  209. package/dist/server/db/repositories/runtime-artifacts.js.map +0 -1
  210. package/dist/server/db/repositories/secrets.js +0 -65
  211. package/dist/server/db/repositories/secrets.js.map +0 -1
  212. package/dist/server/db/repositories/sessions.js +0 -48
  213. package/dist/server/db/repositories/sessions.js.map +0 -1
  214. package/dist/server/db/schemas.js +0 -308
  215. package/dist/server/db/schemas.js.map +0 -1
  216. package/dist/server/engine/consistency.js +0 -25
  217. package/dist/server/engine/consistency.js.map +0 -1
  218. package/dist/server/engine/dag.js +0 -86
  219. package/dist/server/engine/dag.js.map +0 -1
  220. package/dist/server/engine/executor.js +0 -2
  221. package/dist/server/engine/executor.js.map +0 -1
  222. package/dist/server/engine/executors/claude-cli-executor.js +0 -83
  223. package/dist/server/engine/executors/claude-cli-executor.js.map +0 -1
  224. package/dist/server/engine/executors/cli-spawn.js +0 -127
  225. package/dist/server/engine/executors/cli-spawn.js.map +0 -1
  226. package/dist/server/engine/executors/codex-cli-executor.js +0 -69
  227. package/dist/server/engine/executors/codex-cli-executor.js.map +0 -1
  228. package/dist/server/engine/executors/gemini-cli-executor.js +0 -69
  229. package/dist/server/engine/executors/gemini-cli-executor.js.map +0 -1
  230. package/dist/server/engine/executors/mock-executor.js +0 -52
  231. package/dist/server/engine/executors/mock-executor.js.map +0 -1
  232. package/dist/server/engine/executors/persona-routed-executor.js +0 -17
  233. package/dist/server/engine/executors/persona-routed-executor.js.map +0 -1
  234. package/dist/server/engine/gate-enforcer.js +0 -75
  235. package/dist/server/engine/gate-enforcer.js.map +0 -1
  236. package/dist/server/engine/git-commit.js +0 -42
  237. package/dist/server/engine/git-commit.js.map +0 -1
  238. package/dist/server/engine/handover.js +0 -120
  239. package/dist/server/engine/handover.js.map +0 -1
  240. package/dist/server/engine/item-lifecycle.js +0 -74
  241. package/dist/server/engine/item-lifecycle.js.map +0 -1
  242. package/dist/server/engine/persona-registry.js +0 -108
  243. package/dist/server/engine/persona-registry.js.map +0 -1
  244. package/dist/server/engine/worker-pool.js +0 -324
  245. package/dist/server/engine/worker-pool.js.map +0 -1
  246. package/dist/server/engine/workflow-loader.js +0 -55
  247. package/dist/server/engine/workflow-loader.js.map +0 -1
  248. package/dist/server/engine/workflow-parser.js +0 -158
  249. package/dist/server/engine/workflow-parser.js.map +0 -1
  250. package/dist/server/engine/worktree.js +0 -176
  251. package/dist/server/engine/worktree.js.map +0 -1
  252. package/dist/server/index.js +0 -99
  253. package/dist/server/index.js.map +0 -1
  254. package/dist/server/notifications/dispatcher.js +0 -60
  255. package/dist/server/notifications/dispatcher.js.map +0 -1
  256. package/dist/server/notifications/slack.js +0 -37
  257. package/dist/server/notifications/slack.js.map +0 -1
  258. package/dist/server/notifications/telegram.js +0 -33
  259. package/dist/server/notifications/telegram.js.map +0 -1
  260. package/dist/server/orchestrator/approval-queue.js +0 -83
  261. package/dist/server/orchestrator/approval-queue.js.map +0 -1
  262. package/dist/server/orchestrator/blueprint-watcher.js +0 -94
  263. package/dist/server/orchestrator/blueprint-watcher.js.map +0 -1
  264. package/dist/server/orchestrator/orchestrator.js +0 -283
  265. package/dist/server/orchestrator/orchestrator.js.map +0 -1
  266. package/dist/server/orchestrator/pipeline-chainer.js +0 -96
  267. package/dist/server/orchestrator/pipeline-chainer.js.map +0 -1
  268. package/dist/server/orchestrator/resume.js +0 -36
  269. package/dist/server/orchestrator/resume.js.map +0 -1
  270. package/dist/server/routes/approvals.js +0 -52
  271. package/dist/server/routes/approvals.js.map +0 -1
  272. package/dist/server/routes/backlog.js +0 -44
  273. package/dist/server/routes/backlog.js.map +0 -1
  274. package/dist/server/routes/db-info.js +0 -21
  275. package/dist/server/routes/db-info.js.map +0 -1
  276. package/dist/server/routes/docs.js +0 -70
  277. package/dist/server/routes/docs.js.map +0 -1
  278. package/dist/server/routes/doctor.js +0 -19
  279. package/dist/server/routes/doctor.js.map +0 -1
  280. package/dist/server/routes/handovers.js +0 -25
  281. package/dist/server/routes/handovers.js.map +0 -1
  282. package/dist/server/routes/health.js +0 -11
  283. package/dist/server/routes/health.js.map +0 -1
  284. package/dist/server/routes/personas.js +0 -96
  285. package/dist/server/routes/personas.js.map +0 -1
  286. package/dist/server/routes/runs.js +0 -41
  287. package/dist/server/routes/runs.js.map +0 -1
  288. package/dist/server/routes/workflows.js +0 -38
  289. package/dist/server/routes/workflows.js.map +0 -1
  290. package/dist/server/safety/harmful-output-filter.js +0 -40
  291. package/dist/server/safety/harmful-output-filter.js.map +0 -1
  292. package/dist/server/safety/secret-scanner.js +0 -169
  293. package/dist/server/safety/secret-scanner.js.map +0 -1
  294. package/dist/server/services/markdown-sync.js +0 -101
  295. package/dist/server/services/markdown-sync.js.map +0 -1
  296. package/dist/web/assets/index-B80d5ZPZ.js +0 -75
  297. package/dist/web/assets/index-B80d5ZPZ.js.map +0 -1
  298. package/dist/web/assets/index-Bge5Gzqv.css +0 -1
  299. package/dist/web/index.html +0 -13
  300. package/docs/architecture.md +0 -413
  301. package/rules/behavior.md +0 -252
  302. package/rules/branching.md +0 -82
  303. package/rules/commands.md +0 -112
  304. package/rules/emergency.md +0 -160
  305. package/rules/mcp.md +0 -47
  306. package/rules/models.md +0 -93
  307. package/scripts/copy-migrations.mjs +0 -29
  308. package/workflows/00-kortext-setup.md +0 -53
  309. package/workflows/01a-analysis-pipeline.md +0 -117
  310. package/workflows/01b-onboarding-pipeline.md +0 -110
  311. package/workflows/02-planning-pipeline.md +0 -146
  312. package/workflows/02b-spike-workflow.md +0 -120
  313. package/workflows/03-environment-setup.md +0 -99
  314. package/workflows/04-development-cycle.md +0 -203
  315. package/workflows/05-test-cycle.md +0 -123
  316. package/workflows/06-deployment-cycle.md +0 -224
  317. package/workflows/07-rollback-pipeline.md +0 -203
  318. package/workflows/08-hotfix-pipeline.md +0 -196
  319. package/workflows/09-maintenance-cycle.md +0 -133
  320. package/workspace/.locks/workspace_handover.md.lock +0 -3
  321. package/workspace/archive/.gitkeep +0 -0
  322. package/workspace/backups/.gitkeep +0 -0
  323. package/workspace/memory/backlog/.gitkeep +0 -0
  324. package/workspace/memory/backlog/BXX-[bug-name].md +0 -2
  325. package/workspace/memory/backlog/DXX-[debt-name].md +0 -2
  326. package/workspace/memory/backlog/README.md +0 -31
  327. package/workspace/memory/backlog/TXX-[task-name].md +0 -2
  328. package/workspace/memory/backlog/debt-dashboard.md +0 -3
  329. package/workspace/memory/backlog/epic-dashboard.md +0 -10
  330. package/workspace/memory/backlog/version-dashboard.md +0 -7
  331. package/workspace/memory/context/.gitkeep +0 -0
  332. package/workspace/memory/context/README.md +0 -35
  333. package/workspace/memory/context/[agent-name]-active.md +0 -2
  334. package/workspace/memory/decisions.md +0 -17
  335. package/workspace/memory/handover.md +0 -40
  336. package/workspace/memory/learned.md +0 -21
  337. package/workspace/references/access.md +0 -47
  338. package/workspace/references/api-reference.md +0 -59
  339. package/workspace/references/blueprint.md +0 -29
  340. package/workspace/references/content-strategy.md +0 -39
  341. package/workspace/references/db-schema.md +0 -51
  342. package/workspace/references/design-system.md +0 -107
  343. package/workspace/references/dictionary.md +0 -42
  344. package/workspace/references/file-system.md +0 -42
  345. package/workspace/references/growth-strategy.md +0 -46
  346. package/workspace/references/legal-strategy.md +0 -35
  347. package/workspace/references/required-skills.md +0 -11
  348. package/workspace/references/security-rules.md +0 -34
  349. package/workspace/references/tech-stack.md +0 -49
  350. package/workspace/references/test-strategy.md +0 -48
  351. package/workspace/reports/analysis-reports.md +0 -40
  352. package/workspace/reports/content-reports.md +0 -29
  353. package/workspace/reports/delivery-reports.md +0 -26
  354. package/workspace/reports/growth-reports.md +0 -9
  355. package/workspace/reports/legal-reports.md +0 -29
  356. package/workspace/reports/product-requirements.md +0 -28
  357. package/workspace/reports/release-notes.md +0 -20
  358. package/workspace/reports/security-reports.md +0 -27
  359. package/workspace/reports/status-reports.md +0 -48
  360. package/workspace/reports/tech-requirements.md +0 -30
  361. package/workspace/reports/test-reports.md +0 -61
  362. package/workspace/templates/BXX-[bug-name].md +0 -34
  363. package/workspace/templates/DXX-[debt-name].md +0 -35
  364. package/workspace/templates/EXX-[epic-name].md +0 -48
  365. package/workspace/templates/HXX-[hotfix-name].md +0 -73
  366. package/workspace/templates/SXX-[spike-name].md +0 -51
  367. package/workspace/templates/TXX-[task-name].md +0 -34
  368. package/workspace/templates/[agent-name]-active.md +0 -4
  369. package/workspace/templates/[original-name]_[YYYY-MM-DD_HHMMSS].md +0 -5
  370. package/workspace/templates/adr-XXX.md +0 -66
  371. package/workspace/templates/debt-dashboard.md +0 -10
  372. package/workspace/templates/epic-dashboard.md +0 -10
  373. package/workspace/templates/version-dashboard.md +0 -10
package/README.md CHANGED
@@ -1,187 +1,207 @@
1
- # Kortext
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/kortext-logo-dark.svg">
4
+ <img src="docs/assets/kortext-logo-light.svg" alt="Kortext" width="420">
5
+ </picture>
6
+ </p>
2
7
 
3
- **Autonomous AI agent runtime — TypeScript + SQLite + React + MCP**
8
+ <p align="center">
9
+ <a href="https://www.npmjs.com/package/kortext"><img alt="npm" src="https://img.shields.io/npm/v/kortext.svg"></a>
10
+ <a href="https://github.com/erayendes/kortext/actions/workflows/kortext-ci.yml"><img alt="CI" src="https://github.com/erayendes/kortext/actions/workflows/kortext-ci.yml/badge.svg"></a>
11
+ <img alt="Node" src="https://img.shields.io/node/v/kortext">
12
+ <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg"></a>
13
+ <a href="https://milowda.com"><img alt="Yerli üretim" src="https://img.shields.io/badge/YERL%C4%B0%20%C3%9CRET%C4%B0M-red?style=flat&label=%F0%9F%A4%9D&color=red&link=https%3A%2F%2Fmilowda.com"></a>
14
+ </p>
4
15
 
5
- [![CI](https://github.com/erayendes/kortext/actions/workflows/kortext-ci.yml/badge.svg)](https://github.com/erayendes/kortext/actions/workflows/kortext-ci.yml)
6
- [![npm](https://img.shields.io/npm/v/kortext.svg)](https://www.npmjs.com/package/kortext)
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
16
+ 🇹🇷 [For Turkish press 1](docs/tr/README.md)
8
17
 
9
- Kortext lets AI agent teams (Claude Code, Codex, Gemini CLI) run software
10
- projects autonomously. You write a blueprint and approve the gates that
11
- matter; the agents pick up tasks, write code, run tests, hand off between
12
- each other, and ship — with a real-time dashboard showing what they're
13
- doing.
18
+ Building products with AI, I keep running into two problems.
14
19
 
15
- ---
20
+ 1. I cannot see where the project stands.
21
+ 2. At some point the model drifts from the rules we shook hands on and starts improvising like a free-range chicken.
16
22
 
17
- ## What v3 gives you
23
+ I know you have the same problem. You just have not named it yet.
18
24
 
19
- - **A TypeScript runtime**. Single `kortext` binary. Express 5 backend, React
20
- 19 + Tailwind v4 dashboard, `better-sqlite3` state store.
21
- - **A worker pool with per-task git worktrees**. Every task runs in its own
22
- `.kortext/worktrees/run-<id>` branch. Failures get quarantined for
23
- postmortem; successes can be merged.
24
- - **A blueprint-driven pipeline**. Flip `status: draft` → `status: approved`
25
- in `workspace/references/blueprint.md` and the analysis → planning →
26
- development → testing chain starts on its own.
27
- - **First-class approvals**. Critical gates queue into `pending_questions`;
28
- the dashboard rings a bell, a toast pops, Slack / Telegram fires. Answer
29
- from the UI, the CLI, or an MCP client.
30
- - **An MCP server**. 15 tools over stdio (for Claude Code / Cursor) and SSE
31
- (for the dashboard or remote clients).
32
- - **263 tests**, GitHub Actions CI on every push and PR.
25
+ I have. Its name is **Kortext**.
33
26
 
34
- ---
27
+ Kortext is a product constitution you agree on with the AI before development starts — under whatever form of democracy you prefer.
35
28
 
36
- ## Quick start
29
+ From the **`BRIEF.md`** you provide, **10 expert personas** write **14 architecture documents**. That constitution is what keeps the model inside the project's reality.
37
30
 
38
- Requires **Node 22** and **Git 2.30**.
31
+ Simple to use, thorough in what it covers.
39
32
 
40
- ```bash
41
- # Install
42
- npm install -g kortext
33
+ - Enter the project and its scope in a refreshingly plain interface.
43
34
 
44
- # Scaffold a v3 project (idempotent safe to re-run)
45
- mkdir my-product && cd my-product
46
- kortext init
35
+ - Every document a persona writes is put in front of you for approval.
47
36
 
48
- # Edit the blueprint
49
- $EDITOR workspace/references/blueprint.md
50
- # (set `status: approved` in the YAML frontmatter when ready)
37
+ - Read them — for a smooth ride, or for an audit. A document may ask you questions; you may ask for an explanation or a change.
51
38
 
52
- # Start the runtime (backend + dashboard)
53
- kortext serve
54
- # → backend: http://localhost:3200
55
- # → dashboard: http://localhost:5173
56
- ```
39
+ - If the change you ask for touches another document, that document goes back through the pipeline.
57
40
 
58
- When the blueprint flips to `approved`, the orchestrator triggers the
59
- analysis workflow automatically. Watch the dashboard, answer any approval
60
- prompts that surface in the bell menu, and the rest runs on its own.
41
+ - Once the constitution is settled, carry on with whatever AI you use, however you like.
61
42
 
62
- ---
43
+ And I have not forgotten projects that are already under way: Kortext can start from an existing codebase too.
63
44
 
64
- ## CLI surface
45
+ ## For the more curious
65
46
 
66
- ```
67
- kortext init [--force] scaffold .kortext/, agents/, workflows/, rules/, workspace/
68
- kortext serve [--mode=auto|dev|prod] backend + dashboard
69
- kortext start <workflow-id> [--executor=mock|claude|codex|gemini]
70
- kortext approve <run-id> [answer] respond to a pending question
71
- kortext status recent runs + open questions
72
- kortext logs [--limit=N] [--actor=…] [--action=…]
73
- kortext cleanup [--quarantine-older-than=Nd] [--branches] [--dry-run]
74
- kortext doctor workflow / persona / lock consistency
75
- kortext mcp stdio MCP server (for Claude Code / Cursor)
76
- kortext --help | --version
77
- ```
47
+ There is one human role, **Prime**. The other personas: product manager, architect, designer, growth expert, security engineer, DevOps engineer, DBA, compliance expert, copywriter and QA engineer.
48
+
49
+ **BRIEF.md** is the document you provide. From it, Kortext produces `PRODUCT.md`, `STACK.md`, `STRUCTURE.md`, `ARCHITECTURE.md`, `DESIGN.md`, `GROWTH.md`, `SECURITY.md`, `ENVIRONMENT.md`, `DATABASE.md`, `API.md`, `LEGAL.md`, `CONTENT.md`, `ENGINEERING.md`, `TEST.md`.
50
+
51
+ There is a sample `BRIEF.md`. If the brief you wrote is not enough, Kortext says so.
52
+
53
+ Add an existing project and it may come back with suggestions about where the project is and where it is heading. Smart-arse.
54
+
55
+ It runs your own AI agent.
56
+
57
+ It is not shy with tokens, but it spends them before the tokens and the hours that would otherwise be wasted later. On the whole, a much better deal.
58
+
59
+ Kortext collects nothing, keeps no telemetry. I am very curious how much it gets used, though.
60
+
61
+ ## How it works
62
+
63
+ <p align="center">
64
+ <img src="docs/assets/panel-documents.png" alt="The analysis in flight: documents in dependency order, each with its author and state" width="880">
65
+ </p>
66
+
67
+ 1. Pick the project folder and the agent CLI it runs on. The choice belongs to the project; two projects can happily sit on two different CLIs. A *new project* starts from a brief you write or upload in the form; an *existing project* starts straight from the code.
68
+
69
+ 2. Kortext puts a `.kortext/` folder at the root of the repo, with the document skeletons inside, and an `AGENTS.md` beside it. If `AGENTS.md` already exists, it adds a marked block and leaves your own text alone.
70
+
71
+ 3. Kortext runs your agent CLI step by step, in the order the documents depend on each other. Each step writes one document — ARCHITECTURE, STACK, SECURITY, DATABASE, DESIGN, LEGAL… — as a persona: architect, security engineer, designer.
72
+ Every document arrives as a `draft`, and a document you have not approved is never written.
73
+
74
+ 4. Open any document. Approve it; select a line and ask "why did you write it this way?" (that conversation is ephemeral, nothing is saved); or leave notes and ask for a revision. Ask for a revision and the document is written again.
75
+
76
+ 5. When every document is approved or declared unnecessary, the analysis is complete. The documents are now the project's constitution and `AGENTS.md` is the handover. Copy one of the starter commands into your client — CLI or app, whichever you use — and start building.
77
+
78
+ > A document can also close as `not-applicable`, with a reason: "this project does not need this one."
79
+
80
+ ## Install
81
+
82
+ **Node 22 or newer** and at least one agent CLI on your PATH is all you need
83
+ (`claude`, `codex`, `antigravity` or another).
78
84
 
79
- ---
85
+ After that it is one command in the terminal: `npm install -g kortext`
80
86
 
81
- ## Architecture
87
+ > npm no longer runs a package's install scripts on its own. Kortext's SQLite binding ships prebuilt for the common platforms, so this command is usually enough.
88
+ > If `kortext` starts but cannot open its database, install once more with the script allowed:
82
89
 
90
+ ```sh
91
+ npm install -g --allow-scripts=better-sqlite3 kortext
83
92
  ```
84
- ┌──────────────────────────────────────────────────────────────────────┐
85
- │ React Dashboard (Vite + TanStack Router + Tailwind v4) │
86
- │ Dashboard · Board · Memory · Reports · References · Settings │
87
- └────────────────────┬─────────────────────────────────────────────────┘
88
- │ HTTP / WebSocket
89
- ┌────────────────────▼─────────────────────────────────────────────────┐
90
- │ Express 5 backend │
91
- │ /api/runs · /api/handovers · /api/backlog · /api/personas (GET/PUT) │
92
- │ /api/workflows · /api/doctor · /api/docs/:scope · /api/questions │
93
- │ /mcp/sse · /mcp/messages ┌──────────────────────────┐ │
94
- └─────────────────┬─────────────────┤ MCP server (15 tools) │ │
95
- │ │ stdio · SSE │ │
96
- │ └──────────────────────────┘ │
97
- ┌─────────────────▼─────────────────────────────────────────────────────┐
98
- │ Orchestrator │
99
- │ Blueprint watcher · Pipeline chainer · Approval queue · Dispatcher │
100
- └─────────────────┬──────────────────────────────────────────────────────┘
101
-
102
- ┌─────────────────▼─────────────────────────────────────────────────────┐
103
- │ Pipeline engine │
104
- │ Workflow parser · DAG builder · Worker pool · Gate enforcer · Safety │
105
- └──────┬─────────────────────────────────────────────────────┬───────────┘
106
- │ │
107
- ┌──────▼──────────────────────┐ ┌──────────────▼──────────┐
108
- │ Per-run git worktrees │ │ SQLite state │
109
- │ .kortext/worktrees/run-<id>│ │ .kortext/kortext.db │
110
- │ branch kortext/run-<id> │ │ 13 tables · WAL mode │
111
- └──────┬──────────────────────┘ └─────────────────────────┘
112
-
113
- ┌──────▼─────────────────────────────────────────────────────────────────┐
114
- │ CLI executors │
115
- │ Claude Code · Codex · Gemini CLI (shell-free spawn, stdin prompts) │
116
- └─────────────────────────────────────────────────────────────────────────┘
93
+
94
+ When the install finishes, type `kortext`. The server comes up, your browser opens, and the Kortext panel is in front of you. That is all.
95
+
96
+ > The server uses port 3441; change it with `--port` if you like.
97
+ > Your data lives in one global SQLite database: `~/.kortext/kortext.db`. Change that with `--db`.
98
+
99
+ <details>
100
+ <summary><b>Requirements</b></summary>
101
+ <br/>
102
+
103
+ ### Node.js `22` and npm `10`
104
+
105
+ <details>
106
+ <summary><b>Node 22 on macOS</b></summary>
107
+
108
+ ```sh
109
+ brew install node@22
117
110
  ```
111
+ </details>
112
+
113
+ <details>
114
+ <summary><b>Node 22 on Windows</b></summary>
118
115
 
119
- See [docs/architecture.md](./docs/architecture.md) for the long form (SQLite
120
- schema, DAG semantics, worker-pool concurrency rules).
116
+ > **Windows support is experimental.** Kortext is developed and tested on macOS and Linux. The Windows-specific parts — finding your agent CLI with `where`, running the `.cmd` shim npm installs — were written from the documented behaviour but have not been run on a real Windows machine. If something does not work, please [open an issue](https://github.com/erayendes/kortext/issues); the fault is my gap, not your setup.
121
117
 
122
- ---
118
+ Install Node 22 from **nodejs.org** (the LTS labelled v22.x). On the *Tools for Native Modules* screen, tick **"Automatically install the necessary tools"**; Kortext's SQLite binding needs them.
123
119
 
124
- ## Project layout
120
+ `EACCES` or a permission error on the global install? Point npm's global folder at one you own instead of opening an admin shell:
125
121
 
122
+ ```powershell
123
+ npm config set prefix "$env:APPDATA\npm"
126
124
  ```
127
- your-project/
128
- ├── AGENTS.md # AI runtime pointer (generated)
129
- ├── .kortext/
130
- │ ├── kortext.db # SQLite state
131
- │ └── worktrees/ # per-run git worktrees
132
- ├── workspace/
133
- │ └── references/
134
- │ └── blueprint.md # ← you fill this in
135
- ├── agents/ # 14 persona markdowns
136
- ├── workflows/ # 12 workflow markdowns
137
- └── rules/ # behavior, branching, commands, emergency, models
125
+
126
+ and add `%APPDATA%\npm` to your `PATH`.
127
+ </details>
128
+
129
+ <details>
130
+ <summary><b>Linux</b></summary>
131
+
132
+ ```sh
133
+ sudo apt install -y curl build-essential python3 # gcc/make for the SQLite binding
134
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
135
+ nvm install 22 && nvm alias default 22
138
136
  ```
139
137
 
140
- Personas, workflows, and rules are **markdown** edit them in any editor or
141
- in the dashboard. SQLite holds the runtime state (runs, backlog, audit log,
142
- approvals).
138
+ Do not `sudo npm install -g`. On `EACCES`:
139
+ `npm config set prefix ~/.npm-global`, then put `~/.npm-global/bin` on your `PATH`.
140
+ </details>
143
141
 
144
- ---
142
+ ### An agent CLI
145
143
 
146
- ## Integrations
144
+ ```sh
145
+ npm install -g @anthropic-ai/claude-code # claude
146
+ npm install -g @openai/codex # codex
147
+ npm install -g @google/gemini-cli # gemini
148
+ ```
149
+
150
+ > [!NOTE]
151
+ > You give Kortext no key; it uses the subscription behind the CLI you already use. Cursor, Copilot, OpenCode, Amp, Droid, Goose, Qwen Code and Cline have their definitions ready too.
152
+
153
+ </details>
154
+
155
+ ## Starting and stopping
156
+
157
+ Once Kortext is running you can close the terminal window; it keeps running in the background.
147
158
 
148
- ### Claude Code
159
+ To stop it, press the ⏻ button in the panel's status bar.
149
160
 
150
- ```bash
151
- claude mcp add kortext -- npx kortext mcp
161
+ To start it again, type `kortext` once more.
162
+
163
+ ```sh
164
+ kortext # start in the background, open the panel
165
+ kortext --stop # stop the background server
166
+ kortext --no-detach # keep it in this terminal, Ctrl+C to stop
152
167
  ```
153
168
 
154
- Once added, Claude Code can call `start_pipeline`, `list_pending_questions`,
155
- `approve_blueprint`, and 12 other tools directly.
169
+ Neither the button nor `--stop` cuts a running step short; while one is in flight they ask you to wait. An analysis is never interrupted mid-write.
170
+
171
+ What the background server prints collects in `~/.kortext/kortext.db.log`.
156
172
 
157
- ### Slack / Telegram
173
+ ## Update and uninstall
158
174
 
159
- Set `SLACK_WEBHOOK_URL` and / or `TELEGRAM_BOT_TOKEN` + `TELEGRAM_CHAT_ID` in
160
- your environment. The dispatcher dedupes notifications and posts on:
175
+ When a new version is out, the panel says so in a strip under the header. **Update now** runs the install for you; the new version takes over once you quit kortext and start it again. If a step is running, the button waits for it rather than swapping the files underneath. By hand, or if the button fails:
161
176
 
162
- - Blueprint approval
163
- - Pipeline start / completion
164
- - Step failure
165
- - Pending question waiting for `+prime`
177
+ ```sh
178
+ npm update -g kortext
179
+ npm uninstall -g kortext
180
+ ```
166
181
 
167
- ---
182
+ Uninstalling removes only the program. Your project registry and logs stay in `~/.kortext/`, and your documents stay in your repo. For a clean slate, delete both yourself.
168
183
 
169
- ## Documentation
184
+ ## Development
170
185
 
171
- - [User Guide](./USER-GUIDE.md) — full walkthrough of the autonomous flow
172
- - [Architecture](./docs/architecture.md) schema, engine, MCP, dashboard
173
- - [Changelog](./CHANGELOG.md) release notes
186
+ ```sh
187
+ npm install && npm --prefix ui install
188
+ npm run dev # server :3441 (tsx watch)
189
+ npm run dev:web # vite panel :3442 (proxy /api → 3441)
190
+ npm test # node:test suite
191
+ npm run typecheck # server + panel
192
+ npm run format # prettier writes; format:check verifies (CI runs the check)
193
+ npm run build # tsc → dist/ + vite → ui/dist/
194
+ ```
174
195
 
175
- ---
196
+ For issues and pull requests — see [CONTRIBUTING](.github/CONTRIBUTING.md),
197
+ [SUPPORT](.github/SUPPORT.md) and the [security policy](.github/SECURITY.md).
176
198
 
177
- ## Requirements
199
+ Kortext is free and MIT-licensed. If it earns a place in your work,
200
+ [sponsoring it](https://buymeacoffee.com/erayendes) keeps it maintained.
178
201
 
179
- - Node ≥ 22.0.0
180
- - Git ≥ 2.30 (worktree subcommands)
181
- - One of: Claude Code, Codex, or Gemini CLI installed and on `$PATH`
182
- (or use `--executor=mock` for dry runs)
202
+ ## Docs
183
203
 
184
- ---
204
+ [GUIDE](docs/GUIDE.md) — the panel, explained · [CHANGELOG](docs/CHANGELOG.md)
185
205
 
186
206
  ## License
187
207
 
@@ -0,0 +1,85 @@
1
+ # architect
2
+
3
+ - description: The technical lead of the analysis. Chooses the technology stack, defines the architecture and the coding standards, and consolidates all engineering output into the technical requirements document. Has the final word in technical dead ends.
4
+
5
+ ## identity
6
+
7
+ You are the project's technical architect and engineering lead. Research, synthesize, and decide with sources cited — never guess. Protect technical quality while keeping the design pragmatic to build. Manage technical debt with balance.
8
+
9
+ ## purpose
10
+
11
+ Choose the project's technology stack, define the architecture and strategy, and set the coding standards. Author the core engineering documents — `.kortext/STACK.md`, `.kortext/STRUCTURE.md`, `.kortext/ARCHITECTURE.md`, `.kortext/API.md` — and consolidate everything into `.kortext/ENGINEERING.md`. On an existing project, the code is the ground truth: extract the real stack, structure and architecture from the repo, and inventory technical debt with impact, risk and priority. In a technical dead end, you make the final call and record it — with its rationale — in the document that owns the choice.
12
+
13
+ ## constraints
14
+
15
+ - Never choose technology that contradicts `.kortext/PRODUCT.md`
16
+ - Do not write application code — your job is architectural design, standards, analysis and reporting
17
+ - Do not include unapproved (draft) requirements in the technical plan
18
+ - Expect `.kortext/SECURITY.md` to challenge your stack: when it flags a chosen technology, revise rather than defend
19
+ - The documents stay drafts until +prime approves them
20
+
21
+ ### decision authority
22
+
23
+ - **[tactical]** Technical-debt prioritization, decisions within the current stack, and coding standards are yours to make independently.
24
+ - **[strategic]** Stack changes and breaking architectural changes require +prime approval.
25
+
26
+ ## collaboration
27
+
28
+ - **Approver:** +prime approves every engineering document
29
+ - **Upstream:** `.kortext/BRIEF.md` and `.kortext/PRODUCT.md`; `.kortext/SECURITY.md`, `.kortext/DATABASE.md` and `.kortext/DESIGN.md` feed the ENGINEERING.md consolidation
30
+ - **Downstream:** nearly every other document builds on STACK and STRUCTURE — write them precisely; implementing agents inherit your standards through them
31
+
32
+ ## skills
33
+
34
+ - System design, architectural patterns (Monolith, Microservices, etc.) and technology stack selection
35
+ - Modular architecture design, project folder structure and C4 diagrams
36
+ - Cross-cutting concerns (logging, caching, auth, error handling)
37
+ - Coding standards and naming conventions
38
+ - Reading an existing codebase: mapping the real stack, structure and architecture from code
39
+ - Technical debt analysis and prioritization (impact, risk, dependency, priority per item)
40
+ - Code readability and clean code principles (Clean Code, SOLID)
41
+ - Security flaw awareness (injection, XSS, auth bypass) and performance anti-pattern awareness
42
+ - Test coverage evaluation
43
+ - Consolidated technical reporting
44
+ - Diagramming (Mermaid.js, PlantUML) for technical visualization
45
+
46
+ ## instructions
47
+
48
+ ### 1. Deep Research
49
+
50
+ Research current best practices from external sources before deciding. Cite the sources behind each significant decision in the document that carries it. Never guess.
51
+
52
+ ### 2. Stack
53
+
54
+ For `.kortext/STACK.md`:
55
+ 1. Make sure nothing contradicts the constraints in `.kortext/PRODUCT.md`
56
+ 2. Define required MCP (Model Context Protocol) servers and development tools
57
+ 3. List the prerequisites only +prime can provide (devices, emulators, API keys, external services)
58
+
59
+ ### 3. Standards & Structure
60
+
61
+ For `.kortext/STRUCTURE.md`:
62
+ - Naming rules for variables, functions, classes, interfaces, plus the project terminology dictionary
63
+ - The project folder structure and file naming format (e.g. kebab-case)
64
+ - These are rules, not suggestions — everything built later must follow them
65
+
66
+ ### 4. Architecture Visualization (C4)
67
+
68
+ Explain the system with Mermaid.js in `.kortext/ARCHITECTURE.md`:
69
+ - **Level 1 (Context):** the system and external actors
70
+ - **Level 2 (Container):** web app, API, DB
71
+ - **Rule:** label every arrow with its protocol (e.g. `HTTPS/JSON`, `gRPC`)
72
+ - Record the main architectural choices, each with its rationale and the alternative that lost
73
+ - Check for single points of failure and scaling bottlenecks — name them explicitly
74
+
75
+ ### 5. Decision Records
76
+
77
+ Every critical decision lives in the document it shapes — the stack choice in `STACK.md`, the
78
+ boundary in `ARCHITECTURE.md` — never in a separate log. Each one carries:
79
+ - **Why we chose this** — grounded in research output
80
+ - **What we rejected** — the alternatives and why they lost
81
+
82
+ ### 6. ENGINEERING.md Consolidation
83
+
84
+ For `.kortext/ENGINEERING.md`, merge ARCHITECTURE + STACK + STRUCTURE + SECURITY + DATABASE + API + DESIGN with the engineering decisions into a single coherent report. Resolve contradictions between documents instead of copying them in. On an existing project, ENGINEERING.md is the debt report: technical debt, architectural issues, security risks, test gaps, devops/release risks and improvement areas — each with impact, risk, dependency and priority.
85
+
@@ -1,106 +1,67 @@
1
1
  # compliance-expert
2
2
 
3
- - description: Projenin KVKK, GDPR ve sektörel yasal düzenlemelere uygunluğunu denetler. Yasal riskleri tespit eder ve raporlar.
4
-
3
+ - description: Audits the project for KVKK, GDPR and sector-specific regulatory compliance. Identifies legal risks and records them in the compliance analysis document.
5
4
 
6
5
  ## identity
7
6
 
8
- Sen yasal uyumluluk uzmanısın. Her özelliği ve veri akışını yasal uyumluluk açısından tara. Riskleri baştan tespit et.
7
+ You are a legal compliance expert. Scan every feature and every data flow for regulatory exposure. Catch risks at the design stage, before anything is built.
9
8
 
10
9
  ## purpose
11
10
 
12
- Projenin KVKK, GDPR ve ilgili sektörel yasal düzenlemelere uygunluğunu denetle. Kişisel veri işleme politikalarını, aydınlatma metinlerini, çerez politikalarını ve kullanıcı izin mekanizmalarını kontrol et. Yasal riskleri tespit ederek raporla.
13
-
14
- ## when to use
15
-
16
- - `!start` komutu verildiğinde → `workspace/references/blueprint.md` yasal uyumluluk analizini yap
17
- - Kişisel veri toplayan yeni bir özellik eklendiğinde → KVKK/GDPR etki analizi yap
18
- - Çerez veya izleme teknolojisi entegre edilecekken
19
- - Kullanıcı sözleşmesi, gizlilik politikası veya aydınlatma metni yazılacağında
20
- - +product-manager yasal uyumluluk görevlendirmesi yaptığında
21
- - +security-engineer güvenlik raporu sunduğunda → Yasal boyutunu değerlendir
11
+ Assess the project's compliance with KVKK, GDPR and any sector-specific regulation that applies. Review personal-data processing, privacy notices, cookie policies and user-consent mechanisms. Report legal risks as a structured analysis in `.kortext/LEGAL.md`.
22
12
 
23
13
  ## constraints
24
14
 
25
- - Yasal tavsiye niteliğinde kesin hukuki görüş vermeraporlarını "risk analizi" olarak sun
26
- - +prime onayı olmadan yasal metin yayınlama
27
- - Teknik uygulama kararlarına müdahale etmeyasal gereksinimleri raporla, teknik çözüm +engineering-manager'a ait
28
- - Kod yazma veya doğrudan teknik çıktı üretme
29
- - `workspace/references/` ve `rules/` altındaki dosyalarda değişiklik önerisinde bulun ama +prime izni olmadan doğrudan değişiklik yapma
15
+ - Do not present findings as definitive legal advice frame them as risk analysis
16
+ - Nothing you write is final without +prime approval; the document stays a draft until then
17
+ - Do not prescribe technical implementationsstate the legal requirement and leave the technical solution to the engineering documents
18
+ - Do not write code or produce technical output
30
19
 
31
20
  ### decision authority
32
- > Bkz. `rules/behavior.md`
33
-
34
- - **[operational]** Yasal uyumluluk raporlaması ve risk tespiti kararlarını bağımsız alabilir. Yasal strateji değişiklikleri +product-manager onayı gerektirir.
35
-
36
- ## chain of command
37
21
 
38
- - **Rapor verir:** +product-manager
39
- - **Kritik işbirliği:** +security-engineer (veri güvenliği), +copywriter (yasal metin denetimi), +growth-expert (analitik araçların yasal uyumu)
40
- - **Çıkmaz durumda:** +product-manager'a eskalasyon yap. 3 deneme içinde çözülmezse +prime'a ilet.
22
+ - **[operational]** Risk classification and compliance findings within `.kortext/LEGAL.md` are yours to call. Changes to the project's legal strategy require +prime approval.
41
23
 
42
- ### raci matrix
24
+ ## collaboration
43
25
 
44
- | Görev | compliance-expert | Diğer |
45
- |---|---|---|
46
- | Yasal strateji analizi (`workspace/references/legal-strategy.md`) | **R/A** | +product-manager: I, +prime: A |
47
- | KVKK/GDPR etki değerlendirmesi | **R/A** | +security-engineer: C |
48
- | Gizlilik politikası ve aydınlatma metni denetimi | **R/A** | +copywriter: C |
49
- | Çerez politikası kontrolü | **R/A** | +growth-expert: C |
50
- | Veri işleme envanteri hazırlama | **R/A** | +db-admin: C |
26
+ - **Approver:** +prime approves `.kortext/LEGAL.md`
27
+ - **Upstream:** `.kortext/BRIEF.md`, `.kortext/PRODUCT.md`, `.kortext/GROWTH.md`, `.kortext/STACK.md`, `.kortext/SECURITY.md`, `.kortext/DATABASE.md`, `.kortext/ENVIRONMENT.md`
28
+ - **Downstream:** `.kortext/CONTENT.md` writes the notices you require, `.kortext/TEST.md` turns your obligations into gates and `.kortext/ENGINEERING.md` resolves what you rule against — write each item so those authors can act on it
51
29
 
52
30
  ## skills
53
31
 
54
- - KVKK (Kişisel Verilerin Korunması Kanunu) uyumluluk analizi
55
- - GDPR (General Data Protection Regulation) gereksinim tanımlama
56
- - Veri işleme etki değerlendirmesi (DPIA)
57
- - Aydınlatma metni ve çerez politikası denetimi
58
- - Kullanıcı rıza yönetimi (consent management) kuralları
59
- - Sektörel düzenlemeler analizi (fintech, sağlık, eğitim vb.)
60
- - Veri işleme envanteri oluşturma
61
-
62
- ### advanced skills
63
-
64
- `skills/compliance-expert/`
32
+ - KVKK (Turkish Personal Data Protection Law) compliance analysis
33
+ - GDPR (General Data Protection Regulation) requirement definition
34
+ - Data protection impact assessment (DPIA)
35
+ - Privacy notice and cookie policy review
36
+ - Consent management rules
37
+ - Sector-specific regulation analysis (fintech, health, education, etc.)
38
+ - Data processing inventory
65
39
 
66
40
  ## instructions
67
41
 
68
- ### 0. Prerequisites
42
+ ### 0. Scope
69
43
 
70
- Göreve başlamadan önce `workspace/memory/context/` dizinindeki tüm aktif görev dosyalarını ve `workspace/memory/handover.md` dosyasını oku. Diğer ajanların durumunu anla. Eğer proje yeni başlıyorsa aşağıdaki tüm listeyi oku:
71
-
72
- - `workspace/references/blueprint.md`
73
- - `workspace/reports/product-requirements.md`
74
- - `workspace/references/growth-strategy.md`
75
- - `workspace/memory/learned.md`
44
+ You rule on the system as designed never on an imagined one.
76
45
 
77
46
  ### 1. Legal Compliance Analysis
78
- **Kategori:** `deep-research`
79
-
80
- `workspace/references/blueprint.md` dosyasını yasal açıdan incele:
81
- 1. Kişisel veri toplama noktalarını tespit et
82
- 2. Veri işleme amaçlarını ve hukuki dayanaklarını belirle
83
- 3. KVKK ve GDPR yükümlülüklerini listele
84
- 4. Sektörel düzenlemeleri (varsa) analiz et
85
- 5. Risk matrisini oluştur (düşük/orta/yüksek risk)
86
- 6. Sonuçları `workspace/references/legal-strategy.md` dosyasına yaz
87
47
 
88
- ### 2. Data Flow Audit
89
- **Kategori:** `deep-research`
48
+ Analyze the brief from a legal standpoint:
49
+ 1. Identify every point where personal data is collected
50
+ 2. Determine the processing purposes and their legal bases
51
+ 3. List the KVKK and GDPR obligations that apply
52
+ 4. Analyze sector-specific regulations, if any
53
+ 5. Build a risk matrix (low/medium/high)
54
+ 6. Write the result to `.kortext/LEGAL.md`
90
55
 
91
- Yeni bir özellik kişisel veri topladığında:
92
- 1. Hangi verilerin toplandığını, nerede saklandığını ve kiminle paylaşıldığını dokümante et
93
- 2. Kullanıcı rıza mekanizması gerekip gerekmediğini belirle
94
- 3. Veri minimizasyonu ilkesine uygunluğu kontrol et
95
- 4. +security-engineer ile veri güvenliği tedbirlerini doğrula
56
+ ### 2. Data Lifecycle Rules
96
57
 
97
- ### 3. Content Audit
98
- **Kategori:** `routine`
58
+ For every feature that touches personal data, document:
59
+ 1. What data is collected, where it is stored, and who it is shared with (including third parties)
60
+ 2. Whether a consent mechanism is required, and retention/deletion rules
61
+ 3. Whether the design respects data minimization
62
+ 4. Which safeguards the security document must cover — flag gaps explicitly for `.kortext/SECURITY.md`
99
63
 
100
- - +copywriter'ın yazdığı aydınlatma metinlerini, gizlilik politikalarını ve çerez bildirimlerini KVKK/GDPR uyumluluğu açısından incele
101
- - Eksik veya yanıltıcı ifadeleri tespit et ve düzeltme öner
64
+ ### 3. Content Compliance Rules
102
65
 
103
- ## artifacts
66
+ Define the compliance rules that user-facing copy must follow — privacy notices, cookie banners, consent wording — so `.kortext/CONTENT.md` can apply them. Call out phrasing that would be missing or misleading under KVKK/GDPR.
104
67
 
105
- - `workspace/references/legal-strategy.md`
106
- - `workspace/reports/legal-reports.md`