kortext 2.2.3 → 3.0.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 (208) hide show
  1. package/AGENTS.md +0 -4
  2. package/CHANGELOG.md +81 -0
  3. package/LICENSE +21 -0
  4. package/README.md +145 -55
  5. package/USER-GUIDE.md +505 -0
  6. package/bin/kortext.js +23 -0
  7. package/bin/kortext.ts +377 -0
  8. package/dist/bin/kortext.js +346 -0
  9. package/dist/bin/kortext.js.map +1 -0
  10. package/dist/mcp/index.js +4 -0
  11. package/dist/mcp/index.js.map +1 -0
  12. package/dist/mcp/server.js +553 -0
  13. package/dist/mcp/server.js.map +1 -0
  14. package/dist/mcp/sse.js +38 -0
  15. package/dist/mcp/sse.js.map +1 -0
  16. package/dist/mcp/stdio.js +44 -0
  17. package/dist/mcp/stdio.js.map +1 -0
  18. package/dist/server/cli/cleanup.js +73 -0
  19. package/dist/server/cli/cleanup.js.map +1 -0
  20. package/dist/server/cli/commands.js +73 -0
  21. package/dist/server/cli/commands.js.map +1 -0
  22. package/dist/server/cli/doctor.js +118 -0
  23. package/dist/server/cli/doctor.js.map +1 -0
  24. package/dist/server/cli/executor-factory.js +39 -0
  25. package/dist/server/cli/executor-factory.js.map +1 -0
  26. package/dist/server/cli/init.js +121 -0
  27. package/dist/server/cli/init.js.map +1 -0
  28. package/dist/server/cli/logs.js +28 -0
  29. package/dist/server/cli/logs.js.map +1 -0
  30. package/dist/server/cli/serve.js +72 -0
  31. package/dist/server/cli/serve.js.map +1 -0
  32. package/dist/server/config/env.js +12 -0
  33. package/dist/server/config/env.js.map +1 -0
  34. package/dist/server/db/client.js +32 -0
  35. package/dist/server/db/client.js.map +1 -0
  36. package/dist/server/db/json.js +21 -0
  37. package/dist/server/db/json.js.map +1 -0
  38. package/dist/server/db/migrate.js +70 -0
  39. package/dist/server/db/migrate.js.map +1 -0
  40. package/dist/server/db/migrations/001_init.sql +243 -0
  41. package/dist/server/db/repositories/audit-log.js +58 -0
  42. package/dist/server/db/repositories/audit-log.js.map +1 -0
  43. package/dist/server/db/repositories/backlog.js +96 -0
  44. package/dist/server/db/repositories/backlog.js.map +1 -0
  45. package/dist/server/db/repositories/contexts.js +54 -0
  46. package/dist/server/db/repositories/contexts.js.map +1 -0
  47. package/dist/server/db/repositories/decisions.js +71 -0
  48. package/dist/server/db/repositories/decisions.js.map +1 -0
  49. package/dist/server/db/repositories/handovers.js +53 -0
  50. package/dist/server/db/repositories/handovers.js.map +1 -0
  51. package/dist/server/db/repositories/index.js +30 -0
  52. package/dist/server/db/repositories/index.js.map +1 -0
  53. package/dist/server/db/repositories/locks.js +59 -0
  54. package/dist/server/db/repositories/locks.js.map +1 -0
  55. package/dist/server/db/repositories/notifications.js +63 -0
  56. package/dist/server/db/repositories/notifications.js.map +1 -0
  57. package/dist/server/db/repositories/pending-questions.js +63 -0
  58. package/dist/server/db/repositories/pending-questions.js.map +1 -0
  59. package/dist/server/db/repositories/runs.js +138 -0
  60. package/dist/server/db/repositories/runs.js.map +1 -0
  61. package/dist/server/db/repositories/runtime-artifacts.js +39 -0
  62. package/dist/server/db/repositories/runtime-artifacts.js.map +1 -0
  63. package/dist/server/db/repositories/secrets.js +65 -0
  64. package/dist/server/db/repositories/secrets.js.map +1 -0
  65. package/dist/server/db/repositories/sessions.js +48 -0
  66. package/dist/server/db/repositories/sessions.js.map +1 -0
  67. package/dist/server/db/schemas.js +308 -0
  68. package/dist/server/db/schemas.js.map +1 -0
  69. package/dist/server/engine/consistency.js +25 -0
  70. package/dist/server/engine/consistency.js.map +1 -0
  71. package/dist/server/engine/dag.js +86 -0
  72. package/dist/server/engine/dag.js.map +1 -0
  73. package/dist/server/engine/executor.js +2 -0
  74. package/dist/server/engine/executor.js.map +1 -0
  75. package/dist/server/engine/executors/claude-cli-executor.js +83 -0
  76. package/dist/server/engine/executors/claude-cli-executor.js.map +1 -0
  77. package/dist/server/engine/executors/cli-spawn.js +127 -0
  78. package/dist/server/engine/executors/cli-spawn.js.map +1 -0
  79. package/dist/server/engine/executors/codex-cli-executor.js +69 -0
  80. package/dist/server/engine/executors/codex-cli-executor.js.map +1 -0
  81. package/dist/server/engine/executors/gemini-cli-executor.js +69 -0
  82. package/dist/server/engine/executors/gemini-cli-executor.js.map +1 -0
  83. package/dist/server/engine/executors/mock-executor.js +52 -0
  84. package/dist/server/engine/executors/mock-executor.js.map +1 -0
  85. package/dist/server/engine/executors/persona-routed-executor.js +17 -0
  86. package/dist/server/engine/executors/persona-routed-executor.js.map +1 -0
  87. package/dist/server/engine/gate-enforcer.js +75 -0
  88. package/dist/server/engine/gate-enforcer.js.map +1 -0
  89. package/dist/server/engine/git-commit.js +42 -0
  90. package/dist/server/engine/git-commit.js.map +1 -0
  91. package/dist/server/engine/handover.js +120 -0
  92. package/dist/server/engine/handover.js.map +1 -0
  93. package/dist/server/engine/item-lifecycle.js +74 -0
  94. package/dist/server/engine/item-lifecycle.js.map +1 -0
  95. package/dist/server/engine/persona-registry.js +108 -0
  96. package/dist/server/engine/persona-registry.js.map +1 -0
  97. package/dist/server/engine/worker-pool.js +324 -0
  98. package/dist/server/engine/worker-pool.js.map +1 -0
  99. package/dist/server/engine/workflow-loader.js +55 -0
  100. package/dist/server/engine/workflow-loader.js.map +1 -0
  101. package/dist/server/engine/workflow-parser.js +158 -0
  102. package/dist/server/engine/workflow-parser.js.map +1 -0
  103. package/dist/server/engine/worktree.js +176 -0
  104. package/dist/server/engine/worktree.js.map +1 -0
  105. package/dist/server/index.js +99 -0
  106. package/dist/server/index.js.map +1 -0
  107. package/dist/server/notifications/dispatcher.js +60 -0
  108. package/dist/server/notifications/dispatcher.js.map +1 -0
  109. package/dist/server/notifications/slack.js +37 -0
  110. package/dist/server/notifications/slack.js.map +1 -0
  111. package/dist/server/notifications/telegram.js +33 -0
  112. package/dist/server/notifications/telegram.js.map +1 -0
  113. package/dist/server/orchestrator/approval-queue.js +83 -0
  114. package/dist/server/orchestrator/approval-queue.js.map +1 -0
  115. package/dist/server/orchestrator/blueprint-watcher.js +94 -0
  116. package/dist/server/orchestrator/blueprint-watcher.js.map +1 -0
  117. package/dist/server/orchestrator/orchestrator.js +283 -0
  118. package/dist/server/orchestrator/orchestrator.js.map +1 -0
  119. package/dist/server/orchestrator/pipeline-chainer.js +96 -0
  120. package/dist/server/orchestrator/pipeline-chainer.js.map +1 -0
  121. package/dist/server/orchestrator/resume.js +36 -0
  122. package/dist/server/orchestrator/resume.js.map +1 -0
  123. package/dist/server/routes/approvals.js +52 -0
  124. package/dist/server/routes/approvals.js.map +1 -0
  125. package/dist/server/routes/backlog.js +44 -0
  126. package/dist/server/routes/backlog.js.map +1 -0
  127. package/dist/server/routes/db-info.js +21 -0
  128. package/dist/server/routes/db-info.js.map +1 -0
  129. package/dist/server/routes/docs.js +70 -0
  130. package/dist/server/routes/docs.js.map +1 -0
  131. package/dist/server/routes/doctor.js +19 -0
  132. package/dist/server/routes/doctor.js.map +1 -0
  133. package/dist/server/routes/handovers.js +25 -0
  134. package/dist/server/routes/handovers.js.map +1 -0
  135. package/dist/server/routes/health.js +11 -0
  136. package/dist/server/routes/health.js.map +1 -0
  137. package/dist/server/routes/personas.js +96 -0
  138. package/dist/server/routes/personas.js.map +1 -0
  139. package/dist/server/routes/runs.js +41 -0
  140. package/dist/server/routes/runs.js.map +1 -0
  141. package/dist/server/routes/workflows.js +38 -0
  142. package/dist/server/routes/workflows.js.map +1 -0
  143. package/dist/server/safety/harmful-output-filter.js +40 -0
  144. package/dist/server/safety/harmful-output-filter.js.map +1 -0
  145. package/dist/server/safety/secret-scanner.js +169 -0
  146. package/dist/server/safety/secret-scanner.js.map +1 -0
  147. package/dist/server/services/markdown-sync.js +101 -0
  148. package/dist/server/services/markdown-sync.js.map +1 -0
  149. package/dist/web/assets/index-B80d5ZPZ.js +75 -0
  150. package/dist/web/assets/index-B80d5ZPZ.js.map +1 -0
  151. package/dist/web/assets/index-Bge5Gzqv.css +1 -0
  152. package/dist/web/index.html +13 -0
  153. package/docs/architecture.md +413 -0
  154. package/package.json +83 -11
  155. package/scripts/copy-migrations.mjs +29 -0
  156. package/workspace/.locks/workspace_handover.md.lock +3 -0
  157. package/hooks/audit-logger.sh +0 -25
  158. package/hooks/auto-locker.sh +0 -74
  159. package/hooks/auto-unlocker.sh +0 -17
  160. package/hooks/backlog-sync-guard.sh +0 -12
  161. package/hooks/branch-guard.sh +0 -32
  162. package/hooks/commit-msg-guard.sh +0 -43
  163. package/hooks/git-pre-commit.sh +0 -76
  164. package/hooks/git-pre-push.sh +0 -17
  165. package/hooks/handover-guard.sh +0 -33
  166. package/hooks/kortext-init.sh +0 -194
  167. package/hooks/kortext-lib.sh +0 -151
  168. package/hooks/lint-guard.sh +0 -50
  169. package/hooks/secret-scanner.sh +0 -89
  170. package/hooks/size-guard.sh +0 -48
  171. package/hooks/snapshot-guard.sh +0 -39
  172. package/hooks/write-guard.sh +0 -77
  173. package/scripts/kortext-backlog-add.py +0 -123
  174. package/scripts/kortext-backlog-health.py +0 -112
  175. package/scripts/kortext-backlog-sync.py +0 -117
  176. package/scripts/kortext-bulk-plan.py +0 -63
  177. package/scripts/kortext-cli.py +0 -376
  178. package/scripts/kortext-consistency-check.py +0 -74
  179. package/scripts/kortext-context-check.py +0 -146
  180. package/scripts/kortext-handover.py +0 -107
  181. package/scripts/kortext-item-check.py +0 -61
  182. package/scripts/kortext-item-start.py +0 -70
  183. package/scripts/kortext-item-transition.py +0 -78
  184. package/scripts/kortext-lock.py +0 -174
  185. package/scripts/kortext-session-start.py +0 -127
  186. package/scripts/lock_kortext.sh +0 -34
  187. package/settings/.claude-settings.template.json +0 -48
  188. package/settings/CHANGELOG.md +0 -176
  189. package/settings/INTEGRATION-MAP.md +0 -276
  190. package/settings/README.md +0 -255
  191. package/settings/USER-GUIDE.md +0 -502
  192. package/settings/VERSION +0 -1
  193. package/settings/config.md +0 -8
  194. package/settings/runtime-adapters.md +0 -104
  195. package/skills/backend-developer/.gitkeep +0 -0
  196. package/skills/compliance-expert/.gitkeep +0 -0
  197. package/skills/copywriter/.gitkeep +0 -0
  198. package/skills/db-admin/.gitkeep +0 -0
  199. package/skills/delivery-manager/.gitkeep +0 -0
  200. package/skills/designer/.gitkeep +0 -0
  201. package/skills/devops-engineer/.gitkeep +0 -0
  202. package/skills/engineering-manager/.gitkeep +0 -0
  203. package/skills/frontend-developer/.gitkeep +0 -0
  204. package/skills/growth-expert/.gitkeep +0 -0
  205. package/skills/operation-manager/.gitkeep +0 -0
  206. package/skills/product-manager/.gitkeep +0 -0
  207. package/skills/qa-engineer/.gitkeep +0 -0
  208. package/skills/security-engineer/.gitkeep +0 -0
package/AGENTS.md CHANGED
@@ -1,7 +1,3 @@
1
- > [!WARNING]
2
- > Kortext AI Agent Framework geliştirme aşamasındadır. Amaç Kortext'in kendisini geliştirmektir. Hiç bir adımda Kortext kurallarını uygulama.
3
- > Bu uyarıyı **asla** silme!
4
-
5
1
  # Kortext Ajan Başlatma
6
2
 
7
3
  ## Başlangıç Ajanı
package/CHANGELOG.md ADDED
@@ -0,0 +1,81 @@
1
+ # Changelog
2
+
3
+ All notable changes to Kortext are documented here. The format is based on
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and Kortext adheres to
5
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [3.0.0] — 2026-05-22
8
+
9
+ First public release of Kortext: a TypeScript runtime that lets AI agent teams
10
+ (Claude Code, Codex, Gemini CLI) run software projects autonomously. SQLite
11
+ state store, React dashboard, per-task git worktrees, and a built-in Model
12
+ Context Protocol server.
13
+
14
+ ### Added
15
+
16
+ - **TypeScript runtime** (Node 22+). Single package, ESM, `better-sqlite3`,
17
+ Express 5, Zod, Vitest. Strict mode across the board.
18
+ - **SQLite state store** (`server/db/`). 13 tables — `backlog_items`,
19
+ `contexts`, `locks`, `handovers`, `sessions`, `decisions_index`,
20
+ `pending_questions`, `audit_log`, `runs`, `run_steps`, `runtime_artifacts`,
21
+ `notifications_sent`, `secrets_scan_results`. Migrations live in
22
+ `server/db/migrations/*.sql` and are copied into `dist/` at build time.
23
+ - **Pipeline engine** (`server/engine/`). Parses `workflows/*.md` into a typed
24
+ DAG, performs Kahn-style cycle detection, runs steps through a pull-ready
25
+ worker pool with configurable concurrency (default 3), and short-circuits
26
+ the remainder of the graph on first failure.
27
+ - **Per-task git worktrees** (`server/engine/worktree.ts`). Every run gets its
28
+ own `.kortext/worktrees/run-<id>` branch namespaced as `kortext/run-<id>`.
29
+ Successes can be merged and the worktree removed; failures are moved to a
30
+ timestamped quarantine directory and the branch is preserved for postmortem.
31
+ - **CLI executors for Claude Code, Codex, and Gemini**
32
+ (`server/engine/executors/`). Each has its own file (no shared abstract
33
+ base); all spawn shell-free, pipe the persona prompt via stdin, and write
34
+ per-step logs with declared `outputs:` verification.
35
+ - **Output safety**. `server/safety/secret-scanner.ts` runs on every successful
36
+ step's declared outputs and log; findings flip the step to `failed`.
37
+ `harmful-output-filter.ts` ships as a configurable placeholder for v3.1+.
38
+ - **Autonomous orchestrator** (`server/orchestrator/`). Pipeline chaining via
39
+ `nextWorkflowId`, blueprint watcher (`status: approved` → trigger),
40
+ multi-channel notification dispatcher (Slack + Telegram, deduped), and an
41
+ approval queue surfaced to the dashboard.
42
+ - **Mid-run gate pause/resume**. Workers stop at workflow gates; the queue
43
+ resolves the gate with `decision: approve | reject` and the run resumes
44
+ from the same worktree.
45
+ - **Persona + workflow content layer** (`server/engine/persona-registry.ts`,
46
+ `server/engine/workflow-loader.ts`). 14 personas and 12 workflows are
47
+ authored as markdown — runtime parses them in-memory. Hot reload on disk
48
+ change.
49
+ - **Doctor / consistency checks**. `kortext doctor` validates workflow ↔
50
+ persona references, lock state, and backlog health. Exposed as
51
+ `GET /api/doctor` and an MCP tool.
52
+ - **Item lifecycle**. `kortext-item-start`, `kortext-item-transition`, and
53
+ `kortext-backlog-add` as TypeScript commands; every status change writes
54
+ an audit row and a `chore(kortext): <action> <id>` commit.
55
+ - **React 19 dashboard** (Vite + Tailwind v4 + TanStack Router). Six main
56
+ routes (Dashboard, Board, Memory, Reports, References) plus eight settings
57
+ sub-panes. Bell, toast notifications, terminal panel, and timeline drawer
58
+ are global overlays. Persona Markdown editor is inline (PUT + hot reload).
59
+ - **REST API**. `GET /api/runs`, `/api/handovers`, `/api/backlog`,
60
+ `/api/personas` (GET/PUT), `/api/workflows`, `/api/doctor`,
61
+ `/api/docs/:scope[/:file]` with an allow-listed scope
62
+ (`references | reports | memory | rules | workflows`).
63
+ - **MCP server**. 16 tools registered through a `createKortextMcpServer(deps)`
64
+ factory. Stdio transport for Claude Code / Cursor; SSE transport mounted on
65
+ the same Express instance under `/mcp/sse` + `/mcp/messages` with
66
+ per-session `McpServer` instances.
67
+ - **CLI**. `kortext init | serve | start | approve | status | logs | cleanup |
68
+ doctor | mcp` with `--help` and `--version`. `bin/kortext.js` is a dual-mode
69
+ shim that prefers compiled `dist/bin/kortext.js` and falls back to `tsx` in
70
+ development.
71
+ - **CI**. GitHub Actions workflow (`.github/workflows/kortext-ci.yml`) running
72
+ Node 22 lint → typecheck → test → build → compiled CLI smoke on every push
73
+ and PR to `main`, with `cancel-in-progress` concurrency.
74
+
75
+ ### Compatibility
76
+
77
+ - **Node** ≥ 22.0.0. `better-sqlite3` ≥ 12 requires the Node 26 V8 ABI, which
78
+ is included in Node 22+.
79
+ - **TypeScript** ≥ 5.7 for `allowImportingTsExtensions` +
80
+ `rewriteRelativeImportExtensions`.
81
+ - **Git** ≥ 2.30 (worktree subcommands).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Eray Endes
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,39 +1,79 @@
1
1
  # Kortext
2
2
 
3
- **AI Agent Framework for Autonomous Project Management**
3
+ **Autonomous AI agent runtime TypeScript + SQLite + React + MCP**
4
4
 
5
- Kortext is a structured framework that enables AI agent teams (Claude Code, Gemini CLI, Codex) to run software projects autonomously — with minimal human intervention.
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)
6
8
 
7
- ---
8
-
9
- ## What is Kortext?
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.
10
14
 
11
- Most AI agents are reactive: they answer questions or complete isolated tasks. Kortext turns them into an **autonomous team** that can:
12
-
13
- - Analyze a product idea and produce a full backlog
14
- - Pick up tasks, write code, run tests, and deploy
15
- - Hand off work between agents without losing context
16
- - Lock files to prevent concurrent edits
17
- - Enforce conventions via git hooks
15
+ ---
18
16
 
19
- No coding knowledge required. You describe what you want to build — Kortext agents handle the rest.
17
+ ## What v3 gives you
18
+
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.
20
33
 
21
34
  ---
22
35
 
23
- ## Quick Start
36
+ ## Quick start
37
+
38
+ Requires **Node ≥ 22** and **Git ≥ 2.30**.
24
39
 
25
40
  ```bash
26
- # Install (one-time, global)
41
+ # Install
27
42
  npm install -g kortext
28
43
 
29
- # In your project directory
44
+ # Scaffold a v3 project (idempotent — safe to re-run)
45
+ mkdir my-product && cd my-product
30
46
  kortext init
31
47
 
32
- # Fill in the blueprint (describes your product)
33
- # .kortext/workspace/references/blueprint.md
48
+ # Edit the blueprint
49
+ $EDITOR workspace/references/blueprint.md
50
+ # (set `status: approved` in the YAML frontmatter when ready)
51
+
52
+ # Start the runtime (backend + dashboard)
53
+ kortext serve
54
+ # → backend: http://localhost:3200
55
+ # → dashboard: http://localhost:5173
56
+ ```
57
+
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.
61
+
62
+ ---
63
+
64
+ ## CLI surface
34
65
 
35
- # Then tell your AI agent:
36
- # !start analysis
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
37
77
  ```
38
78
 
39
79
  ---
@@ -41,55 +81,105 @@ kortext init
41
81
  ## Architecture
42
82
 
43
83
  ```
44
- proje/
45
- ├── AGENTS.md # AI runtime entry point (auto-generated by kortext init)
46
- └── .kortext/ # All framework files live here (like .git/)
47
- ├── agents/ # 14 persona definitions
48
- ├── workflows/ # 12 workflow pipelines
49
- ├── hooks/ # 16 git + runtime hooks
50
- ├── scripts/ # 13 Python automation scripts
51
- ├── rules/ # Behavior rules, commands, branching strategy
52
- ├── settings/ # Config, runtime adapters, INTEGRATION-MAP
53
- ├── skills/ # Per-persona skill folders
54
- └── workspace/ # Memory, backlog, references, templates, reports
55
- ├── references/
56
- └── blueprint.md # ← You fill this in
57
- └── memory/
58
- ├── backlog/ # Tasks live here
59
- └── context/ # Active agent files
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
+ └─────────────────────────────────────────────────────────────────────────┘
60
117
  ```
61
118
 
119
+ See [docs/architecture.md](./docs/architecture.md) for the long form (SQLite
120
+ schema, DAG semantics, worker-pool concurrency rules).
121
+
62
122
  ---
63
123
 
64
- ## Supported Runtimes
124
+ ## Project layout
125
+
126
+ ```
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
138
+ ```
139
+
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).
143
+
144
+ ---
145
+
146
+ ## Integrations
147
+
148
+ ### Claude Code
149
+
150
+ ```bash
151
+ claude mcp add kortext -- npx kortext mcp
152
+ ```
153
+
154
+ Once added, Claude Code can call `start_pipeline`, `list_pending_questions`,
155
+ `approve_blueprint`, and 12 other tools directly.
156
+
157
+ ### Slack / Telegram
158
+
159
+ Set `SLACK_WEBHOOK_URL` and / or `TELEGRAM_BOT_TOKEN` + `TELEGRAM_CHAT_ID` in
160
+ your environment. The dispatcher dedupes notifications and posts on:
65
161
 
66
- | Runtime | Hook Integration |
67
- |---|---|
68
- | **Claude Code** | PreToolUse / PostToolUse / SessionStart |
69
- | **Gemini CLI** | preToolCall / postToolCall |
70
- | **Codex / Generic** | AGENTS.md baseline |
162
+ - Blueprint approval
163
+ - Pipeline start / completion
164
+ - Step failure
165
+ - Pending question waiting for `+prime`
71
166
 
72
167
  ---
73
168
 
74
- ## Key Commands
169
+ ## Documentation
75
170
 
76
- | Command | What happens |
77
- |---|---|
78
- | `kortext init` | Set up hooks + runtime adapter in your project |
79
- | `kortext help` | List all available commands |
80
- | `!start analysis` | Agent team analyzes your blueprint |
81
- | `!start planning` | Agent team builds your backlog |
82
- | `!start development` | Agents pick tasks and start coding |
83
- | `kortext status` | Show active sessions and locks |
84
- | `kortext health` | Check backlog and context consistency |
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
85
174
 
86
175
  ---
87
176
 
88
177
  ## Requirements
89
178
 
90
- - Node.js14
91
- - Python3.10
92
- - Git
179
+ - Node ≥ 22.0.0
180
+ - Git2.30 (worktree subcommands)
181
+ - One of: Claude Code, Codex, or Gemini CLI installed and on `$PATH`
182
+ (or use `--executor=mock` for dry runs)
93
183
 
94
184
  ---
95
185