kortext 2.2.3 → 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 (275) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +175 -65
  3. package/agents/architect.md +85 -0
  4. package/agents/compliance-expert.md +36 -75
  5. package/agents/copywriter.md +36 -92
  6. package/agents/db-admin.md +43 -91
  7. package/agents/designer.md +40 -77
  8. package/agents/devops-engineer.md +37 -113
  9. package/agents/growth-expert.md +45 -88
  10. package/agents/product-manager.md +38 -83
  11. package/agents/qa-engineer.md +51 -99
  12. package/agents/security-engineer.md +47 -92
  13. package/bin/kortext.js +2 -0
  14. package/dist/app.js +829 -0
  15. package/dist/cli-spawn.js +137 -0
  16. package/dist/daemon.js +40 -0
  17. package/dist/db.js +78 -0
  18. package/dist/design-preview.js +533 -0
  19. package/dist/docs.js +701 -0
  20. package/dist/engines.js +225 -0
  21. package/dist/index.js +109 -0
  22. package/dist/pick-directory.js +38 -0
  23. package/dist/projects.js +189 -0
  24. package/dist/readiness.js +288 -0
  25. package/dist/runner.js +771 -0
  26. package/dist/update.js +55 -0
  27. package/docs/CHANGELOG.md +11 -0
  28. package/package.json +53 -13
  29. package/templates/AGENTS.md +62 -0
  30. package/templates/docs/API.md +67 -0
  31. package/templates/docs/ARCHITECTURE.md +31 -0
  32. package/templates/docs/BRIEF.md +27 -0
  33. package/templates/docs/CONTENT.md +66 -0
  34. package/templates/docs/DATABASE.md +63 -0
  35. package/templates/docs/DESIGN.md +124 -0
  36. package/templates/docs/ENGINEERING.md +66 -0
  37. package/templates/docs/ENVIRONMENT.md +102 -0
  38. package/templates/docs/GROWTH.md +44 -0
  39. package/templates/docs/LEGAL.md +48 -0
  40. package/templates/docs/PRODUCT.md +43 -0
  41. package/templates/docs/SECURITY.md +65 -0
  42. package/templates/docs/STACK.md +57 -0
  43. package/templates/docs/STRUCTURE.md +73 -0
  44. package/templates/docs/TEST.md +62 -0
  45. package/ui/dist/assets/abnfDiagram-VCTEODGH-Bm7Q2BML.js +1 -0
  46. package/ui/dist/assets/arc-BV9hs0Hu.js +1 -0
  47. package/ui/dist/assets/architecture-7GRP2DOG-RckR3gBI.js +1 -0
  48. package/ui/dist/assets/architectureDiagram-5GKGNRK7-CHiJ6JFT.js +36 -0
  49. package/ui/dist/assets/array-BifhSqXX.js +1 -0
  50. package/ui/dist/assets/blockDiagram-I7D4REHJ-qCbaKVhd.js +129 -0
  51. package/ui/dist/assets/c4Diagram-7LVT6UL2-DidCDJrv.js +38 -0
  52. package/ui/dist/assets/channel-CNUQ11ne.js +1 -0
  53. package/ui/dist/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
  54. package/ui/dist/assets/chunk-4HAMMTFA-CDGFjfVp.js +62 -0
  55. package/ui/dist/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
  56. package/ui/dist/assets/chunk-75Z2AOVW-CbNT4sDh.js +2 -0
  57. package/ui/dist/assets/chunk-DU6HZSFF-Cq2BVv26.js +127 -0
  58. package/ui/dist/assets/chunk-F27PBJKO-CE365m0v.js +1 -0
  59. package/ui/dist/assets/chunk-FOHPRMQF-DHwB1DNv.js +161 -0
  60. package/ui/dist/assets/chunk-GMAD6QVW-DxWL1VC-.js +72 -0
  61. package/ui/dist/assets/chunk-GVQU2GXP-aARV8YbK.js +1 -0
  62. package/ui/dist/assets/chunk-IMKFNOWR-CC790Kt2.js +231 -0
  63. package/ui/dist/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
  64. package/ui/dist/assets/chunk-L3NEJ4N5-BfE4VE8J.js +1 -0
  65. package/ui/dist/assets/chunk-OSK3NFVY-BImQbSWH.js +10 -0
  66. package/ui/dist/assets/chunk-P2QGCYS3-CN3XD313.js +1 -0
  67. package/ui/dist/assets/chunk-POPQ4Y6H-Dqb6jOrX.js +1 -0
  68. package/ui/dist/assets/chunk-PWAF6VOD-DfXX6rBk.js +1 -0
  69. package/ui/dist/assets/chunk-SHT3W25Y-DATyyqPK.js +168 -0
  70. package/ui/dist/assets/chunk-SVP7TREG-r1chwRmg.js +88 -0
  71. package/ui/dist/assets/chunk-TICWLB2K-DL4atHUC.js +206 -0
  72. package/ui/dist/assets/chunk-XXDRQBXY-DXrM6jh7.js +1 -0
  73. package/ui/dist/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
  74. package/ui/dist/assets/classDiagram-ZZMXUADV-BpQxfIQ7.js +1 -0
  75. package/ui/dist/assets/classDiagram-v2-VYDZK3BY-BpQxfIQ7.js +1 -0
  76. package/ui/dist/assets/cose-bilkent-JH36ORCC-Bhe-ZBlS.js +1 -0
  77. package/ui/dist/assets/cynefin-OW5HDTMX-D1koLd-G.js +1 -0
  78. package/ui/dist/assets/cynefinDiagram-5FMLGOSQ-BMcw40hV.js +62 -0
  79. package/ui/dist/assets/cytoscape.esm-CGd-uY3x.js +321 -0
  80. package/ui/dist/assets/dagre-GXQ25YYZ-DBun-Rs2.js +4 -0
  81. package/ui/dist/assets/dagre-PrKaheQc.js +1 -0
  82. package/ui/dist/assets/defaultLocale-BFoDCU3G.js +1 -0
  83. package/ui/dist/assets/diagram-S7CK7UJ4-C1fUIGvo.js +30 -0
  84. package/ui/dist/assets/diagram-UQ7AKVKN-B5FDfkvB.js +41 -0
  85. package/ui/dist/assets/diagram-VSXAHHWV-CCIpOCNC.js +3 -0
  86. package/ui/dist/assets/diagram-VX7I27RA-DV0q2xo_.js +24 -0
  87. package/ui/dist/assets/diagram-Z3DM3KII-B3LCdNgI.js +24 -0
  88. package/ui/dist/assets/dist-EcW76Zvr.js +1 -0
  89. package/ui/dist/assets/ebnfDiagram-PWID7BFC-De_oRbYe.js +1 -0
  90. package/ui/dist/assets/erDiagram-RLTQ6QDP-B9NikMr1.js +99 -0
  91. package/ui/dist/assets/eventmodeling-NTZA5JFV-DZ4t581k.js +1 -0
  92. package/ui/dist/assets/flowDiagram-HODETNUW-DuTOJp1C.js +1 -0
  93. package/ui/dist/assets/ganttDiagram-EL5Y4UJY-BVTqqlPw.js +292 -0
  94. package/ui/dist/assets/gitGraph-4MIJSDKK-xRFaEJdZ.js +1 -0
  95. package/ui/dist/assets/gitGraphDiagram-WWUBYQGX-CK5_GCmX.js +106 -0
  96. package/ui/dist/assets/graphlib-DS17s2tU.js +1 -0
  97. package/ui/dist/assets/index-CjkpNftW.js +46 -0
  98. package/ui/dist/assets/index-DVIDTWin.css +1 -0
  99. package/ui/dist/assets/info-A6RAGUB7-Dg7z-CTI.js +1 -0
  100. package/ui/dist/assets/infoDiagram-27XIBGKW-YaqsOXh0.js +2 -0
  101. package/ui/dist/assets/init-C-OQMol4.js +1 -0
  102. package/ui/dist/assets/ishikawaDiagram-5VMMS53U-C-wtxZPa.js +70 -0
  103. package/ui/dist/assets/journeyDiagram-3NMN7TZE-DsXSXf16.js +139 -0
  104. package/ui/dist/assets/kanban-definition-UXKFOSKX-Ct59fuWk.js +89 -0
  105. package/ui/dist/assets/katex-CXMH3UgJ.js +257 -0
  106. package/ui/dist/assets/line-BUVw9Mhs.js +1 -0
  107. package/ui/dist/assets/linear-D8ncLO0X.js +1 -0
  108. package/ui/dist/assets/mermaid-parser.core-BDC4bG-O.js +7 -0
  109. package/ui/dist/assets/mermaid.core-DZY3WwzX.js +44 -0
  110. package/ui/dist/assets/mindmap-definition-YA3MSWOX-DtiuF6Ce.js +96 -0
  111. package/ui/dist/assets/ordinal-BDEzSJ7C.js +1 -0
  112. package/ui/dist/assets/packet-AYTQ26CC-BX2-w9rD.js +1 -0
  113. package/ui/dist/assets/path-fybaL0A-.js +1 -0
  114. package/ui/dist/assets/pegDiagram-XKGWAZYB-CotwuIHB.js +1 -0
  115. package/ui/dist/assets/pie-WAS4IAKB-Hth8ZVpm.js +1 -0
  116. package/ui/dist/assets/pieDiagram-E7YTZNPT-D9-INs8B.js +39 -0
  117. package/ui/dist/assets/quadrantDiagram-AXDQQJYC-CMtBXZGV.js +7 -0
  118. package/ui/dist/assets/radar-RG4KPBEZ-6UuwQPsw.js +1 -0
  119. package/ui/dist/assets/railroad-74A4TZTK-BF5TZgj0.js +1 -0
  120. package/ui/dist/assets/railroad-abnf-HS5TGJTU-3KYovtYT.js +1 -0
  121. package/ui/dist/assets/railroad-ebnf-LZEXJU2U-DeP4WedE.js +1 -0
  122. package/ui/dist/assets/railroad-peg-WCYAUIDC-i42N1-yk.js +1 -0
  123. package/ui/dist/assets/railroadDiagram-O6MQD6OU-BS6zkU3Z.js +1 -0
  124. package/ui/dist/assets/requirementDiagram-BXWQKSXE-J4IOB-kP.js +84 -0
  125. package/ui/dist/assets/rough.esm-Dy-Kn_BL.js +1 -0
  126. package/ui/dist/assets/sankeyDiagram-P5KCCOFB-jYTCuYzQ.js +40 -0
  127. package/ui/dist/assets/sequenceDiagram-WJ2MYXX4-Cd2r6PW-.js +162 -0
  128. package/ui/dist/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
  129. package/ui/dist/assets/src-7TsfZXRO.js +1 -0
  130. package/ui/dist/assets/stateDiagram-D77RDMKH-DXOdtOKe.js +1 -0
  131. package/ui/dist/assets/stateDiagram-v2-MP3YSRHH-9h7sIf3R.js +1 -0
  132. package/ui/dist/assets/swimlanes-42K2YHIH-BvJGmGs1.js +1 -0
  133. package/ui/dist/assets/swimlanesDiagram-VR7AAH4N-QA4gPi6a.js +8 -0
  134. package/ui/dist/assets/timeline-definition-24CTP7MA-CAaD6-yd.js +120 -0
  135. package/ui/dist/assets/treeView-Q6P3EWNA-4gDEXIyJ.js +1 -0
  136. package/ui/dist/assets/treemap-WGGIJYW6-CGel5TwW.js +1 -0
  137. package/ui/dist/assets/vennDiagram-4TSXK5OY-DpxsKboL.js +34 -0
  138. package/ui/dist/assets/wardley-WFR3VGLG-Ck38v5ns.js +1 -0
  139. package/ui/dist/assets/wardleyDiagram-VM6X3IG4-Ba0grrqs.js +78 -0
  140. package/ui/dist/assets/xychartDiagram-S5SC5T6Z-DH_gC96K.js +7 -0
  141. package/ui/dist/index.html +13 -0
  142. package/ui/dist/kortext-logo-dark.svg +41 -0
  143. package/ui/dist/kortext-logo.svg +41 -0
  144. package/workflows/existing-project-analysis.md +87 -0
  145. package/workflows/new-project-analysis.md +98 -0
  146. package/workflows/planning-pipeline.md +61 -0
  147. package/AGENTS.md +0 -28
  148. package/agents/backend-developer.md +0 -132
  149. package/agents/delivery-manager.md +0 -121
  150. package/agents/engineering-manager.md +0 -208
  151. package/agents/frontend-developer.md +0 -174
  152. package/agents/operation-manager.md +0 -122
  153. package/hooks/audit-logger.sh +0 -25
  154. package/hooks/auto-locker.sh +0 -74
  155. package/hooks/auto-unlocker.sh +0 -17
  156. package/hooks/backlog-sync-guard.sh +0 -12
  157. package/hooks/branch-guard.sh +0 -32
  158. package/hooks/commit-msg-guard.sh +0 -43
  159. package/hooks/git-pre-commit.sh +0 -76
  160. package/hooks/git-pre-push.sh +0 -17
  161. package/hooks/handover-guard.sh +0 -33
  162. package/hooks/kortext-init.sh +0 -194
  163. package/hooks/kortext-lib.sh +0 -151
  164. package/hooks/lint-guard.sh +0 -50
  165. package/hooks/secret-scanner.sh +0 -89
  166. package/hooks/size-guard.sh +0 -48
  167. package/hooks/snapshot-guard.sh +0 -39
  168. package/hooks/write-guard.sh +0 -77
  169. package/rules/behavior.md +0 -252
  170. package/rules/branching.md +0 -82
  171. package/rules/commands.md +0 -112
  172. package/rules/emergency.md +0 -160
  173. package/rules/mcp.md +0 -47
  174. package/rules/models.md +0 -93
  175. package/scripts/kortext-backlog-add.py +0 -123
  176. package/scripts/kortext-backlog-health.py +0 -112
  177. package/scripts/kortext-backlog-sync.py +0 -117
  178. package/scripts/kortext-bulk-plan.py +0 -63
  179. package/scripts/kortext-cli.py +0 -376
  180. package/scripts/kortext-consistency-check.py +0 -74
  181. package/scripts/kortext-context-check.py +0 -146
  182. package/scripts/kortext-handover.py +0 -107
  183. package/scripts/kortext-item-check.py +0 -61
  184. package/scripts/kortext-item-start.py +0 -70
  185. package/scripts/kortext-item-transition.py +0 -78
  186. package/scripts/kortext-lock.py +0 -174
  187. package/scripts/kortext-session-start.py +0 -127
  188. package/scripts/lock_kortext.sh +0 -34
  189. package/settings/.claude-settings.template.json +0 -48
  190. package/settings/CHANGELOG.md +0 -176
  191. package/settings/INTEGRATION-MAP.md +0 -276
  192. package/settings/README.md +0 -255
  193. package/settings/USER-GUIDE.md +0 -502
  194. package/settings/VERSION +0 -1
  195. package/settings/config.md +0 -8
  196. package/settings/runtime-adapters.md +0 -104
  197. package/skills/backend-developer/.gitkeep +0 -0
  198. package/skills/compliance-expert/.gitkeep +0 -0
  199. package/skills/copywriter/.gitkeep +0 -0
  200. package/skills/db-admin/.gitkeep +0 -0
  201. package/skills/delivery-manager/.gitkeep +0 -0
  202. package/skills/designer/.gitkeep +0 -0
  203. package/skills/devops-engineer/.gitkeep +0 -0
  204. package/skills/engineering-manager/.gitkeep +0 -0
  205. package/skills/frontend-developer/.gitkeep +0 -0
  206. package/skills/growth-expert/.gitkeep +0 -0
  207. package/skills/operation-manager/.gitkeep +0 -0
  208. package/skills/product-manager/.gitkeep +0 -0
  209. package/skills/qa-engineer/.gitkeep +0 -0
  210. package/skills/security-engineer/.gitkeep +0 -0
  211. package/workflows/00-kortext-setup.md +0 -53
  212. package/workflows/01a-analysis-pipeline.md +0 -117
  213. package/workflows/01b-onboarding-pipeline.md +0 -110
  214. package/workflows/02-planning-pipeline.md +0 -146
  215. package/workflows/02b-spike-workflow.md +0 -120
  216. package/workflows/03-environment-setup.md +0 -99
  217. package/workflows/04-development-cycle.md +0 -203
  218. package/workflows/05-test-cycle.md +0 -123
  219. package/workflows/06-deployment-cycle.md +0 -224
  220. package/workflows/07-rollback-pipeline.md +0 -203
  221. package/workflows/08-hotfix-pipeline.md +0 -196
  222. package/workflows/09-maintenance-cycle.md +0 -133
  223. package/workspace/archive/.gitkeep +0 -0
  224. package/workspace/backups/.gitkeep +0 -0
  225. package/workspace/memory/backlog/.gitkeep +0 -0
  226. package/workspace/memory/backlog/BXX-[bug-name].md +0 -2
  227. package/workspace/memory/backlog/DXX-[debt-name].md +0 -2
  228. package/workspace/memory/backlog/README.md +0 -31
  229. package/workspace/memory/backlog/TXX-[task-name].md +0 -2
  230. package/workspace/memory/backlog/debt-dashboard.md +0 -3
  231. package/workspace/memory/backlog/epic-dashboard.md +0 -10
  232. package/workspace/memory/backlog/version-dashboard.md +0 -7
  233. package/workspace/memory/context/.gitkeep +0 -0
  234. package/workspace/memory/context/README.md +0 -35
  235. package/workspace/memory/context/[agent-name]-active.md +0 -2
  236. package/workspace/memory/decisions.md +0 -17
  237. package/workspace/memory/handover.md +0 -40
  238. package/workspace/memory/learned.md +0 -21
  239. package/workspace/references/access.md +0 -47
  240. package/workspace/references/api-reference.md +0 -59
  241. package/workspace/references/blueprint.md +0 -29
  242. package/workspace/references/content-strategy.md +0 -39
  243. package/workspace/references/db-schema.md +0 -51
  244. package/workspace/references/design-system.md +0 -107
  245. package/workspace/references/dictionary.md +0 -42
  246. package/workspace/references/file-system.md +0 -42
  247. package/workspace/references/growth-strategy.md +0 -46
  248. package/workspace/references/legal-strategy.md +0 -35
  249. package/workspace/references/required-skills.md +0 -11
  250. package/workspace/references/security-rules.md +0 -34
  251. package/workspace/references/tech-stack.md +0 -49
  252. package/workspace/references/test-strategy.md +0 -48
  253. package/workspace/reports/analysis-reports.md +0 -40
  254. package/workspace/reports/content-reports.md +0 -29
  255. package/workspace/reports/delivery-reports.md +0 -26
  256. package/workspace/reports/growth-reports.md +0 -9
  257. package/workspace/reports/legal-reports.md +0 -29
  258. package/workspace/reports/product-requirements.md +0 -28
  259. package/workspace/reports/release-notes.md +0 -20
  260. package/workspace/reports/security-reports.md +0 -27
  261. package/workspace/reports/status-reports.md +0 -48
  262. package/workspace/reports/tech-requirements.md +0 -30
  263. package/workspace/reports/test-reports.md +0 -61
  264. package/workspace/templates/BXX-[bug-name].md +0 -34
  265. package/workspace/templates/DXX-[debt-name].md +0 -35
  266. package/workspace/templates/EXX-[epic-name].md +0 -48
  267. package/workspace/templates/HXX-[hotfix-name].md +0 -73
  268. package/workspace/templates/SXX-[spike-name].md +0 -51
  269. package/workspace/templates/TXX-[task-name].md +0 -34
  270. package/workspace/templates/[agent-name]-active.md +0 -4
  271. package/workspace/templates/[original-name]_[YYYY-MM-DD_HHMMSS].md +0 -5
  272. package/workspace/templates/adr-XXX.md +0 -66
  273. package/workspace/templates/debt-dashboard.md +0 -10
  274. package/workspace/templates/epic-dashboard.md +0 -10
  275. package/workspace/templates/version-dashboard.md +0 -10
package/dist/update.js ADDED
@@ -0,0 +1,55 @@
1
+ import { spawn } from 'node:child_process';
2
+ // Cache registry version checks for six hours; failures hide the update notice.
3
+ const LATEST_URL = 'https://registry.npmjs.org/kortext/latest';
4
+ const CACHE_MS = 6 * 60 * 60 * 1000;
5
+ let cached = null;
6
+ export async function latestVersion() {
7
+ if (cached && Date.now() - cached.at < CACHE_MS)
8
+ return cached.version;
9
+ try {
10
+ const res = await fetch(LATEST_URL, { signal: AbortSignal.timeout(4000) });
11
+ if (!res.ok)
12
+ return null;
13
+ const { version } = (await res.json());
14
+ if (!version)
15
+ return null;
16
+ cached = { at: Date.now(), version };
17
+ return version;
18
+ }
19
+ catch {
20
+ return null;
21
+ }
22
+ }
23
+ /** Compare the first three numeric version components, ignoring prerelease suffixes. */
24
+ export function isNewer(latest, current) {
25
+ const parts = (v) => v
26
+ .split('-')[0]
27
+ .split('.')
28
+ .map((n) => Number(n) || 0);
29
+ const [a, b] = [parts(latest), parts(current)];
30
+ for (let i = 0; i < 3; i++)
31
+ if ((a[i] ?? 0) !== (b[i] ?? 0))
32
+ return (a[i] ?? 0) > (b[i] ?? 0);
33
+ return false;
34
+ }
35
+ /**
36
+ * Update the global package and allow the SQLite binding install script.
37
+ * Windows requires a shell for the npm .cmd shim; command arguments are fixed.
38
+ */
39
+ export function selfUpdate() {
40
+ return new Promise((resolve) => {
41
+ const proc = spawn('npm', ['install', '-g', '--allow-scripts=better-sqlite3', 'kortext@latest'], { shell: process.platform === 'win32' });
42
+ let output = '';
43
+ const collect = (chunk) => {
44
+ output = (output + chunk.toString()).slice(-4000);
45
+ };
46
+ proc.stdout.on('data', collect);
47
+ proc.stderr.on('data', collect);
48
+ proc.on('error', (err) => resolve({ ok: false, output: err.message }));
49
+ proc.on('close', (code) => {
50
+ if (code === 0)
51
+ cached = null; // the next check compares against what is now installed
52
+ resolve({ ok: code === 0, output: output.trim() });
53
+ });
54
+ });
55
+ }
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ 🇹🇷 [For Turkish press 1](tr/CHANGELOG.md)
4
+
5
+ ## [3.1.0] — 2026-09-14
6
+
7
+ The first public release.
8
+
9
+ What was published under this name before 3.1.0 was a different tool. I used it personally and never released it. This one starts from a similar place, but it is a new product.
10
+
11
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and Kortext follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
package/package.json CHANGED
@@ -1,29 +1,69 @@
1
1
  {
2
2
  "name": "kortext",
3
- "version": "2.2.3",
4
- "description": "AI Agent Framework for Operational Discipline and Automated Project Management",
5
- "main": "index.js",
3
+ "version": "3.1.0",
4
+ "description": "The project brain for AI-driven development: a brief becomes approved analysis documents, then your own agent CLI (Claude Code, Codex, Gemini) writes the code.",
5
+ "type": "module",
6
+ "private": false,
6
7
  "bin": {
7
- "kortext": "scripts/kortext-cli.py"
8
+ "kortext": "./bin/kortext.js"
8
9
  },
10
+ "files": [
11
+ "bin/",
12
+ "dist/",
13
+ "ui/dist/",
14
+ "templates/",
15
+ "workflows/",
16
+ "agents/",
17
+ "LICENSE",
18
+ "docs/CHANGELOG.md"
19
+ ],
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/erayendes/kortext.git"
23
+ },
24
+ "homepage": "https://github.com/erayendes/kortext#readme",
25
+ "bugs": {
26
+ "url": "https://github.com/erayendes/kortext/issues"
27
+ },
28
+ "funding": "https://buymeacoffee.com/erayendes",
9
29
  "scripts": {
10
- "test": "python3 scripts/kortext-consistency-check.py",
11
- "check": "python3 scripts/kortext-context-check.py",
12
- "health": "python3 scripts/kortext-backlog-health.py"
30
+ "dev": "tsx watch --clear-screen=false server/index.ts --no-open --no-detach",
31
+ "dev:web": "npm --prefix ui run dev",
32
+ "build": "tsc -p tsconfig.json && npm --prefix ui run build",
33
+ "typecheck": "tsc -p tsconfig.json --noEmit && npm --prefix ui run typecheck",
34
+ "format": "prettier --write .",
35
+ "format:check": "prettier --check .",
36
+ "test": "tsx --test test/*.test.ts",
37
+ "prepack": "npm run build"
13
38
  },
14
39
  "keywords": [
15
40
  "ai",
16
41
  "agent",
17
- "framework",
18
- "automation",
19
- "project-management",
42
+ "project-planning",
43
+ "analysis",
44
+ "documentation",
45
+ "claude",
46
+ "codex",
20
47
  "gemini",
21
- "claude"
48
+ "agents-md",
49
+ "agentic-coding",
50
+ "local-first"
22
51
  ],
23
52
  "author": "Eray Endes",
24
53
  "license": "MIT",
25
54
  "engines": {
26
- "node": ">=14.0.0",
27
- "python": ">=3.10.0"
55
+ "node": ">=22.0.0"
56
+ },
57
+ "dependencies": {
58
+ "better-sqlite3": "^12.10.0",
59
+ "express": "^5.0.1"
60
+ },
61
+ "devDependencies": {
62
+ "@types/better-sqlite3": "^7.6.12",
63
+ "@types/express": "^5.0.0",
64
+ "@types/node": "^26.4.1",
65
+ "prettier": "^3.9.6",
66
+ "tsx": "^4.23.13",
67
+ "typescript": "^7.0.2"
28
68
  }
29
69
  }
@@ -0,0 +1,62 @@
1
+ # AGENTS.md — Handover Constitution (Kortext v3.1)
2
+
3
+ > This project was analyzed with **Kortext**: every analysis document was produced from the
4
+ > brief, +prime (the human) approved each one individually, and Kortext completed its job
5
+ > and stepped away. This file is the constitution of the development relationship from here
6
+ > on — EVERY agent working on the project follows it.
7
+
8
+ ## 1. The sacred guideline — `.kortext/`
9
+
10
+ Make your decisions by reading from here, not by guessing from the code:
11
+
12
+ - **`.kortext/*.md`** — every document, in one place, in the order they were written:
13
+ `BRIEF` (why this exists) · `PRODUCT` (what it is) · `STACK` (technology + tools) ·
14
+ `STRUCTURE` (standards + folders + terminology) · `ARCHITECTURE` (the shape of the system) ·
15
+ `SECURITY` · `ENVIRONMENT` · `DATABASE` · `API` · `DESIGN` · `GROWTH` · `LEGAL` · `CONTENT` ·
16
+ `ENGINEERING` (the technical contract) · `TEST`. Follow them when producing code and content.
17
+ A file marked `status: not-applicable` was considered and deliberately left empty for this
18
+ project. `PRODUCT` is where the project came from — read it for context, and do not change it
19
+ at will. `BRIEF` sits beside it when the project started from one; a project analysed from an
20
+ existing codebase has none, because the code was the brief.
21
+ - **`## Decisions`** in a document — what another document asked of it and +prime refused,
22
+ with the reason under it. The two documents disagree on purpose: the decision was deferred to
23
+ this phase, where there is finally enough information to make it. Read each line as open
24
+ work, not as fact — when your task touches one, raise it with +prime before you choose. (A
25
+ request that was accepted and done is simply gone — the text says what it asked for; one
26
+ still open sits under `## Change Requests` as a `from` line and is +prime's to decide.)
27
+ **`## Findings`** is the same shape for files no document owns (a `.gitignore`, a CI file):
28
+ informational, and nobody has acted on it yet.
29
+ - **`.kopeng/`** (if present) — the task structure: Version → Epic → Task files. Task
30
+ tracking is Kopeng's job; if it is set up, take your next piece of work from there and
31
+ update its status there.
32
+
33
+ ## 2. Working rules
34
+
35
+ - **Follow the document — or update the document.** If you see that a decision conflicts
36
+ with the guideline, do not silently deviate: either follow the decision, or talk to +prime
37
+ and update the RELEVANT DOCUMENT too. Document and code must not drift apart — that is
38
+ the entire value of this project memory.
39
+ - **Tasks:** if `.kopeng/` exists, work from there. Otherwise work from +prime's
40
+ instructions; if they ask, first split the work into tasks and show the list.
41
+ - **Work that falls to +prime** (opening accounts, API keys, purchases, approvals): you
42
+ cannot do it — report it, and if it creates a wait, make it visible.
43
+ - **Read-before-Write:** read the current version of a shared file before writing to it.
44
+
45
+ ## 3. Behavior constitution (essentials)
46
+
47
+ - **Language:** communicate with +prime in +prime's language. The prose in the `.kortext/`
48
+ documents is written in the language of the brief — keep it that way when you update one.
49
+ Their section headings stay English, as do code, identifiers, file names, commands, commits
50
+ and comments, always, whatever the document language. In-product copy follows the interface
51
+ language the brief names (`CONTENT.md` § Localization).
52
+ - **Secrets:** API keys/passwords/tokens are never written into code, documents, or
53
+ templates — only in `.env` (outside the repo) + key names in `.env.example`. If you notice
54
+ a leak: stop, report to +prime, suggest revoking the key; cleaning git history is +prime's
55
+ decision.
56
+ - **Getting stuck (3-attempt rule):** if 3 different approaches fail on the same blocker,
57
+ STOP; tell +prime what you tried and what you suggest. No moving on with a silent
58
+ workaround.
59
+ - **Conflict:** if you see a conflict between documents, stop producing and ask +prime; do
60
+ not choose silently.
61
+ - **Test discipline:** meet the quality bar in TEST.md; saying "done" means meeting the
62
+ criteria there.
@@ -0,0 +1,67 @@
1
+ ---
2
+ status: uninitialized
3
+ author: +architect
4
+ approver: +prime
5
+ ---
6
+
7
+ # API Reference
8
+
9
+ ## Authentication
10
+
11
+ - **Type:** [e.g., Bearer Token, OAuth2, API Key]
12
+ - **Headers:**
13
+
14
+ ## Base URLs
15
+
16
+ - **Production:** `https://api.example.com/v1`
17
+ - **Staging/Test:** `https://staging-api.example.com/v1`
18
+
19
+ ## Endpoints
20
+
21
+ ### [Module Name / Group Name]
22
+
23
+ #### `GET /path/to/resource` (Description)
24
+
25
+ - **Authorization:** [which role, from the model `SECURITY.md` defines — or `public`]
26
+ - **Parameters / Query:**
27
+ - `param` (type): [Description]
28
+ - **Request Body:** (If any)
29
+
30
+ ```json
31
+ {
32
+ "key": "value"
33
+ }
34
+ ```
35
+
36
+ - **Response Data (Success 2xx):**
37
+
38
+ ```json
39
+ {
40
+ "data": "value"
41
+ }
42
+ ```
43
+
44
+ - **Response Data (Error 4xx/5xx):**
45
+
46
+ ```json
47
+ {
48
+ "error": "Message"
49
+ }
50
+ ```
51
+
52
+ ## Error Codes & Formatting
53
+
54
+ - **200:** Success
55
+ - **400:** Bad Request
56
+ - **401:** Unauthorized
57
+ - **403:** Forbidden
58
+ - **404:** Not Found
59
+ - **500:** Internal Server Error
60
+
61
+ ## Change Requests
62
+
63
+ - [What THIS document asks of another, one line per request: - `TARGET.md` — what must change there and why. It travels to that document when this one is approved. Lines that start with `from` are the other direction — what others asked of this document; the human decides them, kortext ticks them, leave them exactly as they are. Leave this section empty when nothing upstream needs to change]
64
+
65
+ ## Questions for Prime
66
+
67
+ - [Anything prime must answer before this document can be relied on — leave this section empty when there is nothing]
@@ -0,0 +1,31 @@
1
+ ---
2
+ status: uninitialized
3
+ author: +architect
4
+ approver: +prime
5
+ ---
6
+
7
+ # System Architecture
8
+
9
+ ## Components
10
+
11
+ - [The system's main parts: client, server, database, external services…]
12
+
13
+ ## Data flow
14
+
15
+ - [The path a request or piece of data takes through the system; who sends what to whom]
16
+
17
+ ## Boundaries and integrations
18
+
19
+ - [The surfaces where the system touches the outside world: APIs, third-party services, webhooks]
20
+
21
+ ## Why this way
22
+
23
+ - [One line per main architectural choice: the rationale, and the alternative that lost]
24
+
25
+ ## Change Requests
26
+
27
+ - [What THIS document asks of another, one line per request: - `TARGET.md` — what must change there and why. It travels to that document when this one is approved. Lines that start with `from` are the other direction — what others asked of this document; the human decides them, kortext ticks them, leave them exactly as they are. Leave this section empty when nothing upstream needs to change]
28
+
29
+ ## Questions for Prime
30
+
31
+ - [Anything prime must answer before this document can be relied on — leave this section empty when there is nothing]
@@ -0,0 +1,27 @@
1
+ ---
2
+ status: uninitialized
3
+ author: +product-manager
4
+ approver: +prime
5
+ ---
6
+
7
+ # Brief
8
+
9
+ ## Product Vision & Goals
10
+
11
+ - [The product's core purpose and vision]
12
+
13
+ ## Target Audience & Personas
14
+
15
+ - [Which user segments does it serve?]
16
+
17
+ ## Interface Language
18
+
19
+ - [Which language does the product speak to its users? If more than one, name them and say which is the default]
20
+
21
+ ## Key Performance Indicators (KPIs)
22
+
23
+ - [What are the success criteria?]
24
+
25
+ ## Future Scope & Out of Scope
26
+
27
+ - [What is out of scope?]
@@ -0,0 +1,66 @@
1
+ ---
2
+ status: uninitialized
3
+ author: +copywriter
4
+ approver: +prime
5
+ ---
6
+
7
+ # Content Strategy & Microcopy
8
+
9
+ ## Brand Voice & Tone
10
+
11
+ - **Tone:** [e.g., Professional, Friendly, Playful, Serious]
12
+ - **Dos & Don'ts:**
13
+ - **Do:** [e.g., Use simple sentences that guide the user]
14
+ - **Don't:** [e.g., Don't drown the user in technical jargon]
15
+
16
+ ## Message Hierarchy & Page Copy
17
+
18
+ > Written into the surfaces and components `DESIGN.md` names.
19
+
20
+ ### [Surface name]
21
+
22
+ - **Headline:** [the one sentence this screen leads with]
23
+ - **Support:** [the line under it]
24
+ - **Action:** [what the primary button says]
25
+
26
+ ## Microcopy (UI Interface Texts)
27
+
28
+ - **Primary Buttons:** [e.g., 'Continue', 'Save', 'Get Started']
29
+ - **Secondary Buttons:** [e.g., 'Cancel', 'Go Back']
30
+ - **Empty States:** [e.g., 'Nothing here yet — create the first record!']
31
+ - **Success Messages:** [e.g., 'Saved successfully.']
32
+
33
+ ## Error Messages
34
+
35
+ - **Validation Errors:** [e.g., 'This field is required.', 'Invalid email format.']
36
+ - **Server/System Errors:** [e.g., 'Could not reach the server, please try again.']
37
+
38
+ ## Required Legal Notices
39
+
40
+ > `LEGAL.md` names the notices this product owes its users. Write them here in full —
41
+ > a reference is not a notice. Write `none` when compliance requires no user-facing text.
42
+
43
+ ### [Notice — e.g., Cookie consent banner]
44
+
45
+ - **Where it appears:** [surface and moment]
46
+ - **Copy:** [the text the user actually reads, in the interface language]
47
+ - **Obligation it satisfies:** [the rule in `LEGAL.md` this discharges]
48
+
49
+ ## Localization
50
+
51
+ - [Interface language(s) from BRIEF.md; if more than one: source language, target languages, what is translated and what is never translated (product name, code identifiers, legal terms)]
52
+
53
+ ## Email & Notification Templates
54
+
55
+ ### [Notification Type / Scenario]
56
+
57
+ - **Subject:**
58
+ - **Body:**
59
+
60
+ ## Change Requests
61
+
62
+ - [What THIS document asks of another, one line per request: - `TARGET.md` — what must change there and why. It travels to that document when this one is approved. Lines that start with `from` are the other direction — what others asked of this document; the human decides them, kortext ticks them, leave them exactly as they are. Leave this section empty when nothing upstream needs to change]
63
+
64
+ ## Questions for Prime
65
+
66
+ - [Anything prime must answer before this document can be relied on — leave this section empty when there is nothing]
@@ -0,0 +1,63 @@
1
+ ---
2
+ status: uninitialized
3
+ author: +db-admin
4
+ approver: +architect
5
+ ---
6
+
7
+ # Database Schema
8
+
9
+ ## Database Overview
10
+
11
+ - **Database Engine:** [e.g., PostgreSQL, MongoDB]
12
+ - **ORM / ODM:** [e.g., Prisma, Mongoose]
13
+ - **Migrations Tool:** [e.g., Prisma Migrate, TypeORM]
14
+
15
+ ## Conventions & Standards
16
+
17
+ - **Table Naming:** [e.g., snake_case (plural)]
18
+ - **Column Naming:** [e.g., snake_case / camelCase]
19
+ - **Primary Keys:** [e.g., UUID / Auto-increment integer]
20
+ - **Timestamps:** `created_at`, `updated_at` (required)
21
+ - **Personal data:** every column holding personal data carries a `[PII]` marker in its line below, and is repeated in the roll-up section
22
+
23
+ ## Entity-Relationship (ERD) Structure
24
+
25
+ ### Table: `[table_name]`
26
+
27
+ - **Description:** [What the table does]
28
+ - **Columns:**
29
+ - `id` (PK, UUID)
30
+ - `[column_name]` ([type], [nullable/unique]) [PII if personal] - [Description]
31
+ - **Relations:**
32
+ - `[FK/Relation]` -> `[Related Table]`
33
+
34
+ ### Table: `[table_name_2]`
35
+
36
+ - **Description:** [What the table does]
37
+ - **Columns:**
38
+ - `id` (PK)
39
+
40
+ ## Indexes & Performance Optimizations
41
+
42
+ - **[table_name]:** `[column_name]` (Index Type) -> Reason
43
+
44
+ ## Personal Data Columns
45
+
46
+ > `LEGAL.md` is run against this list — it decides retention and erasure duties from it.
47
+ > Write `none` when the schema holds no personal data at all.
48
+
49
+ | Table.Column | What it holds | Why the product needs it |
50
+ | --- | --- | --- |
51
+ | `[table].[column]` | [e.g., the user's email address] | [what breaks without it] |
52
+
53
+ ## Security Policies / Row-Level Security
54
+
55
+ - [e.g., RLS rules, encryption of sensitive data]
56
+
57
+ ## Change Requests
58
+
59
+ - [What THIS document asks of another, one line per request: - `TARGET.md` — what must change there and why. It travels to that document when this one is approved. Lines that start with `from` are the other direction — what others asked of this document; the human decides them, kortext ticks them, leave them exactly as they are. Leave this section empty when nothing upstream needs to change]
60
+
61
+ ## Questions for Prime
62
+
63
+ - [Anything prime must answer before this document can be relied on — leave this section empty when there is nothing]
@@ -0,0 +1,124 @@
1
+ ---
2
+ status: uninitialized
3
+ author: +designer
4
+ approver: +prime
5
+ ---
6
+
7
+ # Design System (Strict & Tokenized Specification)
8
+
9
+ ## Core Tokens (Atomic Values)
10
+
11
+ > [!WARNING] **FE RULE:**
12
+ > Raw values (HEX, px, rem) are forbidden in code. Only the variable names below may be used.
13
+
14
+ ### Color Palette & Functional Mapping
15
+
16
+ | Token Name | HEX / RGB | Usage Context |
17
+ | :--- | :--- | :--- |
18
+ | `--color-bg-main` | `[VALUE]` | Main page background |
19
+ | `--color-bg-surface` | `[VALUE]` | Cards, modals, sections |
20
+ | `--color-text-base` | `[VALUE]` | Standard text content |
21
+ | `--color-text-muted` | `[VALUE]` | Placeholders, helper text |
22
+ | `--color-primary` | `[VALUE]` | Primary buttons, active links |
23
+ | `--color-primary-hover` | `[VALUE]` | Hover state (required) |
24
+ | `--color-border` | `[VALUE]` | Divider lines and input borders |
25
+ | `--color-success` | `[VALUE]` | Success messages and icons |
26
+ | `--color-error` | `[VALUE]` | Error messages and input error states |
27
+
28
+ ### Spacing Scale (8px Grid Rule)
29
+
30
+ > [!WARNING] **FE RULE:**
31
+ > Margin and padding values may only be picked from this scale. In-between values (13px, 7px, etc.) are forbidden.
32
+
33
+ - `--space-unit`: `8px`
34
+ - `--space-xs`: `4px` (0.5x)
35
+ - `--space-sm`: `8px` (1x)
36
+ - `--space-md`: `16px` (2x)
37
+ - `--space-lg`: `24px` (3x)
38
+ - `--space-xl`: `32px` (4x)
39
+ - `--space-2xl`: `48px` (6x)
40
+
41
+ ---
42
+
43
+ ## Typography (The Vertical Rhythm)
44
+
45
+ > [!WARNING] **FE RULE:**
46
+ > Font-size alone is not enough. Line-height and weight are fixed for each role.
47
+
48
+ | Role | Font-Family | Size (px) | Line-Height | Weight | Letter-Spacing |
49
+ | :--- | :--- | :--- | :--- | :--- | :--- |
50
+ | `H1` | `[Family]` | `40px` | `1.2` | `700` | `-0.02em` |
51
+ | `H2` | `[Family]` | `32px` | `1.2` | `600` | `-0.01em` |
52
+ | `Body` | `[Family]` | `16px` | `1.5` | `400` | `normal` |
53
+ | `Small` | `[Family]` | `12px` | `1.4` | `400` | `0.01em` |
54
+ | `Label` | `[Family]` | `14px` | `1` | `500` | `0.02em` |
55
+
56
+ ---
57
+
58
+ ## Layout & Grid (Structural Constraints)
59
+
60
+ | Property | Value | Description |
61
+ | :--- | :--- | :--- |
62
+ | `--container-max` | `1200px` | Maximum width the content is centered within |
63
+ | `--gutter` | `24px` | Gap between columns |
64
+ | `--screen-sm` | `640px` | Mobile breakpoint |
65
+ | `--screen-md` | `768px` | Tablet breakpoint |
66
+ | `--screen-lg` | `1024px` | Desktop breakpoint |
67
+ | `--safe-area` | `16px` | Minimum edge margin on mobile devices |
68
+
69
+ ---
70
+
71
+ ## Surfaces & Components
72
+
73
+ > Two documents read this section by name: `CONTENT.md` writes copy into the components,
74
+ > `GROWTH.md` measures the surfaces. Name them concretely — an unnamed screen gets no copy
75
+ > and no event.
76
+
77
+ | Surface (screen) | Purpose | Main components |
78
+ | --- | --- | --- |
79
+ | `[Sign in]` | [what the user does here] | [Input, Button, ErrorText] |
80
+
81
+ | Component | Purpose | Copy slots it carries |
82
+ | --- | --- | --- |
83
+ | `[EmptyState]` | [when it is shown] | [title, body, action label] |
84
+
85
+ ## UI Components (Strict Atoms)
86
+
87
+ ### Buttons
88
+
89
+ - **Border-Radius:** `--radius-btn`: `[px]`
90
+ - **Heights:** `Small: 32px`, `Default: 44px`, `Large: 56px`
91
+ - **States (required):**
92
+ - *Focus:* `outline: 2px solid --color-primary`, `offset: 2px`
93
+ - *Active:* `transform: scale(0.98)`
94
+ - *Disabled:* `opacity: 0.5`, `cursor: not-allowed`
95
+
96
+ ### Inputs
97
+
98
+ - **Border:** `1px solid --color-border`
99
+ - **Focus State:** `border-color: --color-primary`, `box-shadow: [Value]`
100
+ - **Border-Radius:** `--radius-input`: `[px]`
101
+
102
+ ### Effects & Elevation
103
+
104
+ - `--shadow-sm`: `[CSS Box Shadow Value]`
105
+ - `--shadow-md`: `[CSS Box Shadow Value]`
106
+ - `--transition-base`: `all 0.2s ease-in-out`
107
+
108
+ ---
109
+
110
+ ## Technical Implementation Directives (Red Lines)
111
+
112
+ 1. **No Magic Numbers:** Any value not defined in the design will be rejected.
113
+ 2. **Icon Mapping:** Only the `[Icon Set Name]` library may be used. Icon sizes must be one of `16/24/32px`.
114
+ 3. **Variable Injection:** Once the designer approves this file, +frontend-developer transfers all values into the `CSS Variables` or `Tailwind Config` file.
115
+ 4. **Consistency:** All "shadow", "blur" and "transition" values must use the CSS defined in this file — no ad-hoc variants.
116
+ 5. **Zero Tolerance for Hardcoding:** A HEX code found in CSS files counts as a critical error (Blocker).
117
+
118
+ ## Change Requests
119
+
120
+ - [What THIS document asks of another, one line per request: - `TARGET.md` — what must change there and why. It travels to that document when this one is approved. Lines that start with `from` are the other direction — what others asked of this document; the human decides them, kortext ticks them, leave them exactly as they are. Leave this section empty when nothing upstream needs to change]
121
+
122
+ ## Questions for Prime
123
+
124
+ - [Anything prime must answer before this document can be relied on — leave this section empty when there is nothing]
@@ -0,0 +1,66 @@
1
+ ---
2
+ status: uninitialized
3
+ author: +architect
4
+ approver: +prime
5
+ ---
6
+
7
+ # Engineering
8
+
9
+
10
+ ## Technical Goals
11
+
12
+ - **Product Goal:** [Reference to the Product Requirements Document]
13
+ - **Engineering Goal:** [The system's technical targets, e.g., must handle 1k requests per second]
14
+
15
+ ## System Architecture & Boundaries
16
+
17
+ - **Client ↔ Server:** [Which interfaces will be used?]
18
+ - **Data Flow:** [What route does the data travel?]
19
+ - **Integrations:** [Which external services does it talk to?]
20
+
21
+ ## Component Details
22
+
23
+ - **Frontend Requirements:** [e.g., SSR required, bundle size max 500kb]
24
+ - **Backend Requirements:** [e.g., a job queue must be used, caching must be enabled]
25
+ - **Data Layer:** [e.g., PostgreSQL 16, Redis 7.x]
26
+
27
+ ## Non-functional Requirements
28
+
29
+ - **Performance:** [latency budget, throughput target]
30
+ - **Reliability:** [uptime, RTO/RPO]
31
+ - **Security:** [auth model, encryption requirements]
32
+ - **Observability:** [logging, metrics, tracing]
33
+
34
+ ## Decisions
35
+
36
+ > The engineering decisions this report merges, each with the document it was made in.
37
+
38
+ - **[Decision]** — [what was chosen, and the alternative that lost] (`SOURCE.md`)
39
+
40
+ ## Compliance Rulings & Conflicts
41
+
42
+ > Where `LEGAL.md` rules against the design, the contradiction is settled here: either the
43
+ > design changes and this line says how, or it stands and this line names the residual risk
44
+ > and who accepted it. An unresolved ruling is an open question, not a silent omission.
45
+
46
+ | Ruling | Source | Resolution | Residual risk |
47
+ | --- | --- | --- | --- |
48
+ | [what compliance requires] | `LEGAL.md` | [what changed, or why it stands] | [none / what remains] |
49
+
50
+ ## Technical Constraints & Risks
51
+
52
+ - **Bottleneck:** [Where could the system slow down?]
53
+ - **Risk:** [Which risks, how likely, and what impact?]
54
+ - **Risk Mitigation:** [How will we manage this risk?]
55
+
56
+ ## Implementation Plan
57
+
58
+ - [High-level implementation steps — fine-grained detail is worked out per task]
59
+
60
+ ## Change Requests
61
+
62
+ - [What THIS document asks of another, one line per request: - `TARGET.md` — what must change there and why. It travels to that document when this one is approved. Lines that start with `from` are the other direction — what others asked of this document; the human decides them, kortext ticks them, leave them exactly as they are. Leave this section empty when nothing upstream needs to change]
63
+
64
+ ## Questions for Prime
65
+
66
+ - [Open questions awaiting a decision — escalated to `prime` or the relevant gate]