atabey 0.1.0 → 0.1.2

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 (2) hide show
  1. package/README.md +117 -66
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,10 +1,19 @@
1
1
  # [GOV] Atabey — AI Governance & Multi-Agent Platform / Orchestrator (Core Engine)
2
2
 
3
- [![Version](https://img.shields.io/badge/Version-v0.1.0-blue.svg)](https://github.com/ysf-bkr/atabey)
3
+ [![Version](https://img.shields.io/badge/Version-v0.1.2-blue.svg)](https://github.com/ysf-bkr/atabey)
4
4
  [![npm](https://img.shields.io/npm/v/atabey)](https://www.npmjs.com/package/atabey)
5
5
  [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
6
6
 
7
- **Atabey Core Engine** is the CLI and orchestration layer of the Atabey framework. It provides the multi-agent system, governance engines, routing engine, risk assessment, quality gates, evaluation and learning, contract management, phase management, memory systems, skill definitions, and provider integrations.
7
+ **Atabey Core Engine** is the CLI and orchestration layer of the Atabey framework: the multi-agent system, governance engines, routing engine, risk assessment, quality gates, evaluation & learning, contract management, phase management, memory systems, skill definitions and provider integrations.
8
+
9
+ **Atabey** is a **local AI control plane & discipline layer** that sits between your
10
+ codebase and your local AI coding assistants. It does **not** write code and does **not**
11
+ host an LLM — it **disciplines, bounds and coordinates** the assistant you already use
12
+ through the Model Context Protocol (MCP).
13
+
14
+ > "Order from Chaos" — keeps AI coding assistants focused, blocks destructive actions,
15
+ > rolls back broken edits, prevents runaway token loops, and records an audit trail.
16
+
8
17
 
9
18
  ---
10
19
 
@@ -12,14 +21,15 @@
12
21
 
13
22
  | Capability | Description |
14
23
  |-----------|-------------|
15
- | **CLI** | 27 commands for initialization, orchestration, status, compliance, memory |
24
+ | **CLI** | 27 commands for initialization, orchestration, status, compliance and memory |
16
25
  | **Engines** | 9 engines: routing, risk, quality, evaluation, health, planning, agent-executor, agent-loop, crud-governance |
17
- | **Agents** | 13 specialized agent definitions with 3-tier hierarchy (Supreme/Core/Recon) |
26
+ | **Agents** | 13 specialized agent definitions with a 3-tier hierarchy (Supreme / Core / Recon) |
27
+ | **Runtime** | Headless CLI adapters, DAG dispatcher, git-worktree isolation, signed evidence bundles |
18
28
  | **Memory** | 3-layer memory: vector (TF-IDF/OpenAI), project, specialty |
19
- | **Skills** | 11 core skills with 8 platform adapter mappings |
29
+ | **Skills** | 11 core skills mapped across 8 platform adapters |
20
30
  | **Providers** | 8 platform adapters: Claude, Gemini, Cursor, Codex, Antigravity, Grok, Local LLM, OpenCode |
21
- | **Contracts** | Zod-schema task contracts, API contracts |
22
- | **Standards** | 30+ governance standard templates |
31
+ | **Contracts** | Zod-schema task contracts and API contracts |
32
+ | **Standards** | 33 governance standard templates |
23
33
 
24
34
  ---
25
35
 
@@ -32,10 +42,10 @@ npm install -g atabey
32
42
  ## Quick Start
33
43
 
34
44
  ```bash
35
- # Initialize in your project
45
+ # Initialize Atabey inside your project
36
46
  npx atabey init gemini --profile freelancer --yes
37
47
 
38
- # Verify installation
48
+ # Verify
39
49
  npx atabey status
40
50
  ```
41
51
 
@@ -54,7 +64,7 @@ npx atabey status
54
64
  | **@database** | Core | 9/10 | Database management, migrations, queries |
55
65
  | **@analyst** | Recon | 8/10 | Strategy analysis, requirements |
56
66
  | **@mobile** | Core | 8/10 | React Native mobile development |
57
- | **@native** | Recon | 8/10 | Native platform integration |
67
+ | **@native** | Recon | 8/10 | Native platform integration (Rust/Go only) |
58
68
  | **@devops** | Core | 8/10 | CI/CD, deploy, infrastructure |
59
69
  | **@explorer** | Recon | 8/10 | Codebase discovery, analysis |
60
70
  | **@git** | Recon | 8/10 | Version control, commit management |
@@ -65,30 +75,27 @@ npx atabey status
65
75
 
66
76
  | Engine | File | Description |
67
77
  |--------|------|-------------|
68
- | **RoutingEngine** | `routing-engine.ts` | TF-IDF + Semantic (cosine similarity) task routing with 60/40 blend |
69
- | **RiskEngine** | `risk-engine.ts` | Keyword + path + behavioral risk assessment (requiresApproval ≥ 60) |
78
+ | **RoutingEngine** | `routing-engine.ts` | TF-IDF + semantic (cosine similarity) task routing, 60/40 blend |
79
+ | **RiskEngine** | `risk-engine.ts` | Keyword + path + behavioral risk assessment (requires approval ≥ 60) |
70
80
  | **QualityGate** | `quality-gate.ts` | Compliance AST scan + lint + content validation |
71
- | **EvaluationEngine** | `evaluation-engine.ts` | Post-task scoring (0-100), specialty memory learning |
72
- | **HealthEngine** | `health-engine.ts` | Weighted project health: agent(30%), quality(25%), security(25%), architecture(20%) |
73
- | **PlanningEngine** | `planning-engine.ts` | DAG-based task plan creation + circular dependency detection |
81
+ | **EvaluationEngine** | `evaluation-engine.ts` | Post-task scoring (0–100), specialty-memory learning |
82
+ | **HealthEngine** | `health-engine.ts` | Weighted project health: agent 30% · quality 25% · security 25% · architecture 20% |
83
+ | **PlanningEngine** | `planning-engine.ts` | DAG-based task plan creation + circular-dependency detection |
74
84
  | **AgentExecutor** | `agent-executor.ts` | Hermes message-based agent task distribution with 3 retries |
75
85
  | **AgentLoop** | `agent-loop.ts` | Background polling loop consuming DELEGATION messages |
76
- | **CrudGovernance** | `crud-governance.ts` | CRUD operation governance rules |
86
+ | **CrudGovernance** | `crud-governance.ts` | CRUD / administrative operation governance rules |
77
87
 
78
- > Contract/policy/phase/session logic lives elsewhere (CLI commands, `atabey-shared`),
79
- > and file locking is `AtomicFileLock` in `packages/shared/src/file-lock.ts`.
88
+ > Contract, policy, phase and session logic lives in the CLI commands and `atabey-shared`;
89
+ > atomic file locking is `AtomicFileLock` in `packages/shared`.
80
90
 
81
- ---
82
-
83
- ## 🧠 3-Layer Memory System
91
+ ## 3-Layer Memory System
84
92
 
85
93
  | Layer | Storage | Technology | Purpose |
86
94
  |-------|---------|------------|---------|
87
- | **Vector Memory** | SQLite | TF-IDF / OpenAI embeddings + Cosine similarity | Semantic search across project knowledge |
95
+ | **Vector Memory** | SQLite | TF-IDF / OpenAI embeddings + cosine similarity | Semantic search across project knowledge |
88
96
  | **Project Memory** | Markdown | `PROJECT_MEMORY.md` | Central project state, synchronized every session |
89
97
  | **Specialty Memory** | Markdown | `.atabey/memory/specialties/{agent}.md` | Per-agent learned conventions from past tasks |
90
98
 
91
- ### Memory Flow
92
99
  ```
93
100
  Task → Evaluation Engine → Score (0-100)
94
101
  ├── Success → extractSuccessLesson() → updateSpecialtyMemory()
@@ -97,6 +104,7 @@ Task → Evaluation Engine → Score (0-100)
97
104
  Next session: readLearnedConventions() → injected into agent prompt
98
105
  ```
99
106
 
107
+
100
108
  ---
101
109
 
102
110
  ## 🎯 11 Core Skills
@@ -119,14 +127,14 @@ Task → Evaluation Engine → Score (0-100)
119
127
 
120
128
  | Platform | Skills | Tool Count |
121
129
  |----------|--------|:----------:|
122
- | **Claude Code** ⭐ | file_system, editing, orchestration, governance, quality, search, memory | 20 tools |
123
- | **Gemini CLI** | file_system, editing, orchestration, governance, quality, search | 14 tools |
124
- | **Cursor IDE** | file_system, editing, search, quality | 9 tools |
125
- | **Codex CLI** | file_system, editing, search, quality | 9 tools |
126
- | **Antigravity CLI** | file_system, editing, orchestration, governance, quality, search | 14 tools |
127
- | **Grok** | file_system, editing, search, quality | 9 tools |
128
- | **Local LLM** | file_system, editing, orchestration, governance, quality, search | 14 tools |
129
- | **OpenCode** | file_system, editing, orchestration, governance, quality, search | 14 tools |
130
+ | **Claude Code** ⭐ | file_system, editing, orchestration, governance, quality, search, memory | 20 |
131
+ | **Gemini CLI** | file_system, editing, orchestration, governance, quality, search | 14 |
132
+ | **Cursor IDE** | file_system, editing, search, quality | 9 |
133
+ | **Codex CLI** | file_system, editing, search, quality | 9 |
134
+ | **Antigravity CLI** | file_system, editing, orchestration, governance, quality, search | 14 |
135
+ | **Grok** | file_system, editing, search, quality | 9 |
136
+ | **Local LLM** | file_system, editing, orchestration, governance, quality, search | 14 |
137
+ | **OpenCode** | file_system, editing, orchestration, governance, quality, search | 14 |
130
138
 
131
139
  ---
132
140
 
@@ -143,51 +151,56 @@ Task → Evaluation Engine → Score (0-100)
143
151
  | **Performance** | performance-standards, observability-standards |
144
152
  | **UI/UX** | tailwind-standards, react-query-standards, react-router-standards |
145
153
  | **Data** | typeorm-standards, vite-standards |
146
- | **Economics** | pino-standards, swagger-standards |
154
+ | **Reporting** | pino-standards, swagger-standards |
147
155
 
148
- ---
149
-
150
- ## 🔌 8 Platform Adapters
156
+ ## 8 Platform Adapters
151
157
 
152
158
  | Platform | Framework Dir | Agents Dir | Shim File |
153
159
  |----------|---------------|------------|-----------|
154
160
  | **Claude Code** | `.claude` | `.claude/agents/*.md` | `CLAUDE.md` |
155
161
  | **Gemini CLI** | `.gemini` | `.gemini/agents/*.md` | `GEMINI.md` |
156
162
  | **Cursor IDE** | `.cursor` | `.cursor/rules/*.mdc` | `CURSOR.md` |
157
- | **Codex CLI** | `.agents` | `.agents/instructions/*.md` | `copilot-instructions.md` |
163
+ | **Codex CLI / Copilot** | `.agents` | `.agents/instructions/*.md` | `copilot-instructions.md` |
158
164
  | **Antigravity CLI** | `.agents` | `.agents/agents/{name}/agent.json` | `AGENTS.md` |
159
165
  | **Grok** | `.grok` | `.grok/agents/*.md` | `GROK.md` |
160
- | **Local LLM** | `.atabey` | `.atabey/agents/*.md` | `LOCAL_AI.md` |
166
+ | **Local LLM / Ollama** | `.atabey` | `.atabey/agents/*.md` | `LOCAL_AI.md` |
161
167
  | **OpenCode** | `.opencode` | `.opencode/agents/*.md` | `OPENCODE.md` |
162
168
 
169
+ > `atabey init <platform> --unified` configures and mirrors agents across **all platforms simultaneously**.
170
+
171
+
163
172
  ---
164
173
 
165
174
  ## 📋 CLI Reference
166
175
 
167
176
  ```bash
168
177
  atabey init [adapter] Initialize Atabey (--profile freelancer|team|enterprise)
169
- atabey mcp start Start MCP server
170
- atabey mcp install Generate mcp.json config
171
- atabey status Show agent statuses and costs
178
+ atabey mcp start|install MCP server management
179
+ atabey status Show agent statuses and token usage
172
180
  atabey check Full health and compliance check
173
- atabey orchestrate Start orchestration workflow loop
181
+ atabey orchestrate Start the orchestration workflow loop
174
182
  atabey approve <traceId> Approve a blocked high-risk task
175
- atabey hitl answer "<text>" Answer a pending ask_human question
176
- atabey @agent "task" Send task directly to an agent
183
+ atabey hitl status|answer|approve|reject HITL responses & approvals
177
184
  atabey trace new|replay <id> Create/replay an execution trace
178
- atabey contract Verify contract integrity
179
- atabey plan [task] Create a task plan
180
- atabey memory update <sect> <content> Update project memory
181
- atabey log [agent] View agent logs
182
- atabey explorer graph|audit Explore / audit codebase
183
- atabey security [path] Run security audit
184
- atabey compliance [path] Run compliance check
185
- atabey db <status|migrate|verify|backup|restore> SQLite schema, integrity & backups
186
- atabey secrets <list|set|get|delete|scan> AES-256-GCM secret vault & leak scan
187
- atabey api <scan|list|drift|json> API endpoint catalog & contract drift
188
- atabey audit export|erase Signed audit export / KVKK-GDPR erasure
189
- atabey index [dir] Index codebase for RAG
185
+ atabey plan [submit <json>] Create/submit a task plan
186
+ atabey memory update <sect> <content> Update project memory
187
+ atabey git commit|sync Git operations
188
+ atabey explorer graph|audit Explore / audit the codebase
189
+ atabey knowledge <query> Knowledge base search
190
+ atabey log [@agent] View agent logs
191
+ atabey script <name> [dir] Run a predefined script
192
+ atabey security [path] Run a security audit
193
+ atabey compliance [path] Run a compliance check
194
+ atabey contract verify|update Contract integrity (update re-syncs hash)
195
+ atabey lint Run ESLint
196
+ atabey db <status|migrate|verify|backup|restore> SQLite schema, integrity & backups
197
+ atabey secrets <list|set|get|delete|scan> AES-256-GCM secret vault & leak scan
198
+ atabey api <scan|list|drift|json> API endpoint catalog & contract drift
199
+ atabey audit export|erase Signed audit export / KVKK-GDPR erasure
200
+ atabey worktree <create|list|remove> [name] Isolated agent worktrees
201
+ atabey index [dir] Index the codebase for RAG
190
202
  atabey coverage Test coverage reports
203
+ atabey quickstart Generate an example task file
191
204
  ```
192
205
 
193
206
  ### `atabey init [adapter]` Options
@@ -197,6 +210,7 @@ atabey coverage Test coverage reports
197
210
  | `[adapter]` | `gemini`, `claude`, `cursor`, `grok`, `codex`, `local`, `antigravity-cli`, `opencode` | Target AI platform |
198
211
  | `--profile` | `freelancer`, `team`, `enterprise` | Preset agent group layout |
199
212
  | `--focus` | `fullstack`, `backend`, `frontend`, `mobile`, `mobile-fullstack` | Project type optimization |
213
+ | `--backend` / `--frontend` / `--native` | `node|go|java|python|dotnet|rust` / `vite|next|vanilla` / `rust|go` | Application-tier scaffolding |
200
214
  | `--lang` | `tr`, `en` | Constitution language |
201
215
  | `--unified` | Flag | Multi-platform export |
202
216
  | `--yes` | Flag | Non-interactive mode |
@@ -229,24 +243,52 @@ packages/atabey/
229
243
  └── full/ # Full constitution template
230
244
  ```
231
245
 
232
- ---
246
+ ## 5 Core Capabilities
247
+
248
+ | # | Capability | Description |
249
+ |---|-----------|-------------|
250
+ | 🛠️ | **40 MCP Tools** | File system, search, messaging, governance, memory, quality, network, orchestration |
251
+ | 🧠 | **3-Layer Memory** | Vector (TF-IDF/OpenAI), project memory, specialty (agent learning) |
252
+ | 🤖 | **13 Role Profiles** | 3-tier hierarchy (Supreme / Core / Recon) injected into the host LLM |
253
+ | 🎯 | **11 Core Skills** | Platform-adaptive skills for AI coding environments |
254
+ | 📚 | **30+ Standards** | Governance, security, architecture, compliance, deployment |
233
255
 
234
- ## 🔒 Security & Technical Alignment
235
256
 
236
- ### KVKK/GDPR Alignment
257
+ ## Security & Compliance
258
+
259
+ ### Deterministic, fail-closed governance
260
+ - AST-based compliance scanning + strict TypeScript (**`any` is forbidden**, no `console.*` in production code)
261
+ - **Fail-closed PolicyGate** + deny-by-default RBAC permission matrix (protected paths: `.env*`, `.git/`, `.ssh/`, `.atabey/*`, keys)
262
+ - **Prompt-injection protection** (OWASP LLM01) on both input and response
263
+ - **Secret-leak redaction** on tool output + AES-256-GCM local secret vault
264
+ - **HMAC-SHA256** tamper-evident audit chain
265
+ - SSRF-guarded HTTP proxy (private IP / metadata / DNS-rebinding protection)
266
+ - **TLS 1.3 + optional mTLS** on the unified HTTP/SSE transport
267
+ - Human-in-the-Loop: risk score ≥ 60 requires approval
268
+
269
+ ### KVKK / GDPR technical alignment
237
270
 
238
271
  | Feature | KVKK | GDPR | Status |
239
272
  |---------|------|------|--------|
240
273
  | PII Masking (20+ patterns) | Art. 4, 5, 11, 12 | Art. 5, 32 | ✅ |
241
- | Data Retention (30/90 days) | Art. 5, 7 | Art. 5, 17 | ✅ |
242
- | Right to Erasure | Art. 7 | Art. 17 | ✅ |
274
+ | Data Retention (30–730 days, by category) | Art. 5, 7 | Art. 5, 17 | ✅ |
275
+ | Right to Erasure (`atabey audit erase`) | Art. 7 | Art. 17 | ✅ |
243
276
  | Audit Trail | Art. 11 | Art. 30 | ✅ |
244
277
  | Data Classification | Art. 6 | Art. 9 | ✅ |
245
278
 
246
- ### Zero Type Hole Policy
247
- - `any` type usage is **strictly forbidden**
248
- - All function inputs validated with Zod schemas
249
- - Type safety enforced in governance pipeline
279
+ > Technical compliance tooling — not legal certification. Pair with your DPO / counsel.
280
+
281
+
282
+ ## Token Efficiency
283
+
284
+ Atabey keeps token consumption low at three layers — **there is no monetary budget layer**:
285
+
286
+ 1. **Measurement** — every tool call is counted with the real `cl100k_base` BPE tokenizer (input/output split).
287
+ 2. **Limits** — per-provider context / response / per-minute / per-hour and tool-call rate ceilings (`context-optimizer.ts`). A breach sets a cooldown; hard blocking is opt-in via `ATABEY_TOKEN_BUDGET_ENFORCE=true`.
288
+ 3. **Savings** — `read_file` responses are smart-truncated (imports/types/signatures preserved), `http_proxy` caches + strips HTML, loop detection stops token-burning loops, and `get_task_context` / `get_symbol_outline` / `get_api_catalog` feed the AI pre-indexed context instead of forcing full-repo scans.
289
+
290
+ Tune limits with `MCP_MAX_TOKENS_PER_MINUTE`, `MCP_MAX_TOKENS_PER_HOUR`, `MCP_MAX_CONTEXT_TOKENS`, `MCP_MAX_FILE_READ_SIZE`.
291
+
250
292
 
251
293
  ---
252
294
 
@@ -254,13 +296,22 @@ packages/atabey/
254
296
 
255
297
  - **atabey-shared**: Shared constants, storage, PII masking, audit and locking primitives
256
298
  - **atabey-mcp** _(optional)_: MCP server enabling `atabey mcp start` and the HTTP/SSE transport
257
- - **better-sqlite3**: SQLite database for memory, audit, tasks
299
+ - **better-sqlite3**: SQLite database for memory, audit and tasks
258
300
  - **zod**: Runtime schema validation
259
301
  - **chalk**: Terminal UI styling
260
302
  - **js-yaml**: YAML parsing for the agent-registry validator
261
303
  - **typescript**: TypeScript Compiler API for AST compliance scanning
262
304
 
263
- ---
305
+ ## 🔗 Related Packages
306
+
307
+ | Package | Role | Links |
308
+ |---------|------|-------|
309
+ | **atabey** | Core engine — CLI, agents, engines, orchestrator | [npm](https://www.npmjs.com/package/atabey) · [source](https://github.com/ysf-bkr/atabey/tree/main/packages/atabey) |
310
+ | **atabey-mcp** | MCP server — 40 tools & governance pipeline | [npm](https://www.npmjs.com/package/atabey-mcp) · [source](https://github.com/ysf-bkr/atabey/tree/main/packages/atabey-mcp) |
311
+ | **atabey-shared** | Shared utilities — constants, storage, PII, audit, locks | [npm](https://www.npmjs.com/package/atabey-shared) · [source](https://github.com/ysf-bkr/atabey/tree/main/packages/shared) |
312
+
313
+ > Full bilingual documentation (TR + EN): **[github.com/ysf-bkr/atabey](https://github.com/ysf-bkr/atabey#readme)**
314
+
264
315
 
265
316
  ## License
266
317
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atabey",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Atabey — Local AI Control Plane & Discipline Layer — Core Engine",
5
5
  "author": "Yusuf BEKAR",
6
6
  "license": "AGPL-3.0",
@@ -52,10 +52,10 @@
52
52
  "test:watch": "vitest",
53
53
  "test:coverage": "vitest run --coverage",
54
54
  "lint": "eslint src tests --ext .ts",
55
- "prepublishOnly": "npm run build"
55
+ "prepublishOnly": "node ../../scripts/build-readmes.mjs && npm run build"
56
56
  },
57
57
  "dependencies": {
58
- "atabey-shared": "^0.1.0",
58
+ "atabey-shared": "^0.1.2",
59
59
  "better-sqlite3": "^13.0.2",
60
60
  "chalk": "^5.6.2",
61
61
  "js-yaml": "^4.2.0",
@@ -63,7 +63,7 @@
63
63
  "zod": "^3.24.2"
64
64
  },
65
65
  "optionalDependencies": {
66
- "atabey-mcp": "^0.1.0"
66
+ "atabey-mcp": "^0.1.2"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/better-sqlite3": "^7.6.13",