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.
- package/AGENTS.md +0 -4
- package/CHANGELOG.md +81 -0
- package/LICENSE +21 -0
- package/README.md +145 -55
- package/USER-GUIDE.md +505 -0
- package/bin/kortext.js +23 -0
- package/bin/kortext.ts +377 -0
- package/dist/bin/kortext.js +346 -0
- package/dist/bin/kortext.js.map +1 -0
- package/dist/mcp/index.js +4 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.js +553 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/sse.js +38 -0
- package/dist/mcp/sse.js.map +1 -0
- package/dist/mcp/stdio.js +44 -0
- package/dist/mcp/stdio.js.map +1 -0
- package/dist/server/cli/cleanup.js +73 -0
- package/dist/server/cli/cleanup.js.map +1 -0
- package/dist/server/cli/commands.js +73 -0
- package/dist/server/cli/commands.js.map +1 -0
- package/dist/server/cli/doctor.js +118 -0
- package/dist/server/cli/doctor.js.map +1 -0
- package/dist/server/cli/executor-factory.js +39 -0
- package/dist/server/cli/executor-factory.js.map +1 -0
- package/dist/server/cli/init.js +121 -0
- package/dist/server/cli/init.js.map +1 -0
- package/dist/server/cli/logs.js +28 -0
- package/dist/server/cli/logs.js.map +1 -0
- package/dist/server/cli/serve.js +72 -0
- package/dist/server/cli/serve.js.map +1 -0
- package/dist/server/config/env.js +12 -0
- package/dist/server/config/env.js.map +1 -0
- package/dist/server/db/client.js +32 -0
- package/dist/server/db/client.js.map +1 -0
- package/dist/server/db/json.js +21 -0
- package/dist/server/db/json.js.map +1 -0
- package/dist/server/db/migrate.js +70 -0
- package/dist/server/db/migrate.js.map +1 -0
- package/dist/server/db/migrations/001_init.sql +243 -0
- package/dist/server/db/repositories/audit-log.js +58 -0
- package/dist/server/db/repositories/audit-log.js.map +1 -0
- package/dist/server/db/repositories/backlog.js +96 -0
- package/dist/server/db/repositories/backlog.js.map +1 -0
- package/dist/server/db/repositories/contexts.js +54 -0
- package/dist/server/db/repositories/contexts.js.map +1 -0
- package/dist/server/db/repositories/decisions.js +71 -0
- package/dist/server/db/repositories/decisions.js.map +1 -0
- package/dist/server/db/repositories/handovers.js +53 -0
- package/dist/server/db/repositories/handovers.js.map +1 -0
- package/dist/server/db/repositories/index.js +30 -0
- package/dist/server/db/repositories/index.js.map +1 -0
- package/dist/server/db/repositories/locks.js +59 -0
- package/dist/server/db/repositories/locks.js.map +1 -0
- package/dist/server/db/repositories/notifications.js +63 -0
- package/dist/server/db/repositories/notifications.js.map +1 -0
- package/dist/server/db/repositories/pending-questions.js +63 -0
- package/dist/server/db/repositories/pending-questions.js.map +1 -0
- package/dist/server/db/repositories/runs.js +138 -0
- package/dist/server/db/repositories/runs.js.map +1 -0
- package/dist/server/db/repositories/runtime-artifacts.js +39 -0
- package/dist/server/db/repositories/runtime-artifacts.js.map +1 -0
- package/dist/server/db/repositories/secrets.js +65 -0
- package/dist/server/db/repositories/secrets.js.map +1 -0
- package/dist/server/db/repositories/sessions.js +48 -0
- package/dist/server/db/repositories/sessions.js.map +1 -0
- package/dist/server/db/schemas.js +308 -0
- package/dist/server/db/schemas.js.map +1 -0
- package/dist/server/engine/consistency.js +25 -0
- package/dist/server/engine/consistency.js.map +1 -0
- package/dist/server/engine/dag.js +86 -0
- package/dist/server/engine/dag.js.map +1 -0
- package/dist/server/engine/executor.js +2 -0
- package/dist/server/engine/executor.js.map +1 -0
- package/dist/server/engine/executors/claude-cli-executor.js +83 -0
- package/dist/server/engine/executors/claude-cli-executor.js.map +1 -0
- package/dist/server/engine/executors/cli-spawn.js +127 -0
- package/dist/server/engine/executors/cli-spawn.js.map +1 -0
- package/dist/server/engine/executors/codex-cli-executor.js +69 -0
- package/dist/server/engine/executors/codex-cli-executor.js.map +1 -0
- package/dist/server/engine/executors/gemini-cli-executor.js +69 -0
- package/dist/server/engine/executors/gemini-cli-executor.js.map +1 -0
- package/dist/server/engine/executors/mock-executor.js +52 -0
- package/dist/server/engine/executors/mock-executor.js.map +1 -0
- package/dist/server/engine/executors/persona-routed-executor.js +17 -0
- package/dist/server/engine/executors/persona-routed-executor.js.map +1 -0
- package/dist/server/engine/gate-enforcer.js +75 -0
- package/dist/server/engine/gate-enforcer.js.map +1 -0
- package/dist/server/engine/git-commit.js +42 -0
- package/dist/server/engine/git-commit.js.map +1 -0
- package/dist/server/engine/handover.js +120 -0
- package/dist/server/engine/handover.js.map +1 -0
- package/dist/server/engine/item-lifecycle.js +74 -0
- package/dist/server/engine/item-lifecycle.js.map +1 -0
- package/dist/server/engine/persona-registry.js +108 -0
- package/dist/server/engine/persona-registry.js.map +1 -0
- package/dist/server/engine/worker-pool.js +324 -0
- package/dist/server/engine/worker-pool.js.map +1 -0
- package/dist/server/engine/workflow-loader.js +55 -0
- package/dist/server/engine/workflow-loader.js.map +1 -0
- package/dist/server/engine/workflow-parser.js +158 -0
- package/dist/server/engine/workflow-parser.js.map +1 -0
- package/dist/server/engine/worktree.js +176 -0
- package/dist/server/engine/worktree.js.map +1 -0
- package/dist/server/index.js +99 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/notifications/dispatcher.js +60 -0
- package/dist/server/notifications/dispatcher.js.map +1 -0
- package/dist/server/notifications/slack.js +37 -0
- package/dist/server/notifications/slack.js.map +1 -0
- package/dist/server/notifications/telegram.js +33 -0
- package/dist/server/notifications/telegram.js.map +1 -0
- package/dist/server/orchestrator/approval-queue.js +83 -0
- package/dist/server/orchestrator/approval-queue.js.map +1 -0
- package/dist/server/orchestrator/blueprint-watcher.js +94 -0
- package/dist/server/orchestrator/blueprint-watcher.js.map +1 -0
- package/dist/server/orchestrator/orchestrator.js +283 -0
- package/dist/server/orchestrator/orchestrator.js.map +1 -0
- package/dist/server/orchestrator/pipeline-chainer.js +96 -0
- package/dist/server/orchestrator/pipeline-chainer.js.map +1 -0
- package/dist/server/orchestrator/resume.js +36 -0
- package/dist/server/orchestrator/resume.js.map +1 -0
- package/dist/server/routes/approvals.js +52 -0
- package/dist/server/routes/approvals.js.map +1 -0
- package/dist/server/routes/backlog.js +44 -0
- package/dist/server/routes/backlog.js.map +1 -0
- package/dist/server/routes/db-info.js +21 -0
- package/dist/server/routes/db-info.js.map +1 -0
- package/dist/server/routes/docs.js +70 -0
- package/dist/server/routes/docs.js.map +1 -0
- package/dist/server/routes/doctor.js +19 -0
- package/dist/server/routes/doctor.js.map +1 -0
- package/dist/server/routes/handovers.js +25 -0
- package/dist/server/routes/handovers.js.map +1 -0
- package/dist/server/routes/health.js +11 -0
- package/dist/server/routes/health.js.map +1 -0
- package/dist/server/routes/personas.js +96 -0
- package/dist/server/routes/personas.js.map +1 -0
- package/dist/server/routes/runs.js +41 -0
- package/dist/server/routes/runs.js.map +1 -0
- package/dist/server/routes/workflows.js +38 -0
- package/dist/server/routes/workflows.js.map +1 -0
- package/dist/server/safety/harmful-output-filter.js +40 -0
- package/dist/server/safety/harmful-output-filter.js.map +1 -0
- package/dist/server/safety/secret-scanner.js +169 -0
- package/dist/server/safety/secret-scanner.js.map +1 -0
- package/dist/server/services/markdown-sync.js +101 -0
- package/dist/server/services/markdown-sync.js.map +1 -0
- package/dist/web/assets/index-B80d5ZPZ.js +75 -0
- package/dist/web/assets/index-B80d5ZPZ.js.map +1 -0
- package/dist/web/assets/index-Bge5Gzqv.css +1 -0
- package/dist/web/index.html +13 -0
- package/docs/architecture.md +413 -0
- package/package.json +83 -11
- package/scripts/copy-migrations.mjs +29 -0
- package/workspace/.locks/workspace_handover.md.lock +3 -0
- package/hooks/audit-logger.sh +0 -25
- package/hooks/auto-locker.sh +0 -74
- package/hooks/auto-unlocker.sh +0 -17
- package/hooks/backlog-sync-guard.sh +0 -12
- package/hooks/branch-guard.sh +0 -32
- package/hooks/commit-msg-guard.sh +0 -43
- package/hooks/git-pre-commit.sh +0 -76
- package/hooks/git-pre-push.sh +0 -17
- package/hooks/handover-guard.sh +0 -33
- package/hooks/kortext-init.sh +0 -194
- package/hooks/kortext-lib.sh +0 -151
- package/hooks/lint-guard.sh +0 -50
- package/hooks/secret-scanner.sh +0 -89
- package/hooks/size-guard.sh +0 -48
- package/hooks/snapshot-guard.sh +0 -39
- package/hooks/write-guard.sh +0 -77
- package/scripts/kortext-backlog-add.py +0 -123
- package/scripts/kortext-backlog-health.py +0 -112
- package/scripts/kortext-backlog-sync.py +0 -117
- package/scripts/kortext-bulk-plan.py +0 -63
- package/scripts/kortext-cli.py +0 -376
- package/scripts/kortext-consistency-check.py +0 -74
- package/scripts/kortext-context-check.py +0 -146
- package/scripts/kortext-handover.py +0 -107
- package/scripts/kortext-item-check.py +0 -61
- package/scripts/kortext-item-start.py +0 -70
- package/scripts/kortext-item-transition.py +0 -78
- package/scripts/kortext-lock.py +0 -174
- package/scripts/kortext-session-start.py +0 -127
- package/scripts/lock_kortext.sh +0 -34
- package/settings/.claude-settings.template.json +0 -48
- package/settings/CHANGELOG.md +0 -176
- package/settings/INTEGRATION-MAP.md +0 -276
- package/settings/README.md +0 -255
- package/settings/USER-GUIDE.md +0 -502
- package/settings/VERSION +0 -1
- package/settings/config.md +0 -8
- package/settings/runtime-adapters.md +0 -104
- package/skills/backend-developer/.gitkeep +0 -0
- package/skills/compliance-expert/.gitkeep +0 -0
- package/skills/copywriter/.gitkeep +0 -0
- package/skills/db-admin/.gitkeep +0 -0
- package/skills/delivery-manager/.gitkeep +0 -0
- package/skills/designer/.gitkeep +0 -0
- package/skills/devops-engineer/.gitkeep +0 -0
- package/skills/engineering-manager/.gitkeep +0 -0
- package/skills/frontend-developer/.gitkeep +0 -0
- package/skills/growth-expert/.gitkeep +0 -0
- package/skills/operation-manager/.gitkeep +0 -0
- package/skills/product-manager/.gitkeep +0 -0
- package/skills/qa-engineer/.gitkeep +0 -0
- package/skills/security-engineer/.gitkeep +0 -0
package/AGENTS.md
CHANGED
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
|
|
3
|
+
**Autonomous AI agent runtime — TypeScript + SQLite + React + MCP**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://github.com/erayendes/kortext/actions/workflows/kortext-ci.yml)
|
|
6
|
+
[](https://www.npmjs.com/package/kortext)
|
|
7
|
+
[](./LICENSE)
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
36
|
+
## Quick start
|
|
37
|
+
|
|
38
|
+
Requires **Node ≥ 22** and **Git ≥ 2.30**.
|
|
24
39
|
|
|
25
40
|
```bash
|
|
26
|
-
# Install
|
|
41
|
+
# Install
|
|
27
42
|
npm install -g kortext
|
|
28
43
|
|
|
29
|
-
#
|
|
44
|
+
# Scaffold a v3 project (idempotent — safe to re-run)
|
|
45
|
+
mkdir my-product && cd my-product
|
|
30
46
|
kortext init
|
|
31
47
|
|
|
32
|
-
#
|
|
33
|
-
|
|
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
|
-
|
|
36
|
-
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
│
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
##
|
|
169
|
+
## Documentation
|
|
75
170
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
|
91
|
-
-
|
|
92
|
-
-
|
|
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)
|
|
93
183
|
|
|
94
184
|
---
|
|
95
185
|
|