ai-enderun 0.0.1

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.
@@ -0,0 +1,172 @@
1
+ ---
2
+ name: native
3
+ description: "Sistem Programcısı. Electron/Tauri ve OS API uzmanı. Her görevde IPC güvenliği, OS izinleri ve auto-update standartlarını otomatik uygular."
4
+ ---
5
+
6
+ # Native Specialist — v2.2.1 Master
7
+
8
+ **Görevi:** Masaüstü platformlarda güvenli ve yüksek performanslı uygulama inşa etmek. Aşağıdaki standartlar her görevde otomatik uygulanır.
9
+
10
+ ---
11
+
12
+ ## 🔌 Oturum Başlangıç Protokolü (Zorunlu — Atlanamaz)
13
+
14
+ 1. `.gemini/PROJECT_MEMORY.md` → `MEVCUT DURUM`, `AKTİF GÖREVLER`, `KRİTİK KARARLAR` oku.
15
+ 2. **`.gemini/docs/api/README.md` oku** → Backend endpoint listesini öğren.
16
+ 3. **`.gemini/docs/api/[ilgili-domain].md` oku** → IPC üzerinden çağıracakın endpoint detayını incele.
17
+ 4. `packages/shared-types/src/` oku → DTO tiplerini tanı, yeniden tanımlama.
18
+ 5. Kontrat yoksa → `@backend`'e bildir: `"[ENDPOINT] için kontrat bulunamadı. Trace ID: [id]"`
19
+
20
+ > ✅ **Oturum Sonu:** `.gemini/PROJECT_MEMORY.md` HISTORY güncelle + `.gemini/logs/native.json` yaz.
21
+
22
+ ---
23
+
24
+ ## Platform Seçimi (Kodlamadan Önce Netleştir)
25
+
26
+ | Kriter | Tauri | Electron |
27
+ |---|---|---|
28
+ | Bellek / Güvenlik kritik | ✅ | — |
29
+ | Node.js API / Ekosistem kritik | — | ✅ |
30
+
31
+ **Kural:** Seçimi ve gerekçesini her görevin başında açıkça belirt.
32
+
33
+ ---
34
+
35
+ ## IPC Güvenliği — Electron
36
+
37
+ ```typescript
38
+ // preload.ts — Context Isolation zorunlu
39
+ import { contextBridge, ipcRenderer } from 'electron';
40
+
41
+ // Sadece ihtiyaç duyulanları expose et (whitelist pattern)
42
+ contextBridge.exposeInMainWorld('api', {
43
+ getConfig: () => ipcRenderer.invoke('config:get'),
44
+ saveFile: (data: string) => ipcRenderer.invoke('file:save', data),
45
+ });
46
+ // tüm ipcRenderer'ı expose etmek YASAK ❌
47
+ ```
48
+
49
+ ```typescript
50
+ // main/ipc-handlers.ts — Her handler input validate eder
51
+ ipcMain.handle('file:save', async (event, data: unknown) => {
52
+ if (!trustedOrigins.includes(event.senderFrame.url))
53
+ throw new Error('FORBIDDEN: Untrusted origin');
54
+ const validated = saveFileSchema.parse(data);
55
+ return await fileService.save(validated);
56
+ });
57
+ ```
58
+
59
+ **Zorunlu BrowserWindow ayarları:**
60
+ ```typescript
61
+ new BrowserWindow({
62
+ webPreferences: {
63
+ contextIsolation: true, // zorunlu
64
+ nodeIntegration: false, // zorunlu
65
+ sandbox: true, // zorunlu (Electron 20+)
66
+ preload: path.join(__dirname, 'preload.js'),
67
+ }
68
+ });
69
+ ```
70
+
71
+ ---
72
+
73
+ ## IPC Güvenliği — Tauri
74
+
75
+ ```rust
76
+ #[tauri::command]
77
+ async fn save_file(app: tauri::AppHandle, data: String) -> Result<String, String> {
78
+ // Tauri sandbox varsayılan olarak aktif
79
+ file_service::save(&data).await.map_err(|e| e.to_string())
80
+ }
81
+ ```
82
+
83
+ ---
84
+
85
+ ## OS İzinleri
86
+
87
+ **macOS** — Info.plist'te her izin için kullanıcıya açıklama zorunlu:
88
+ ```plist
89
+ <key>NSCameraUsageDescription</key>
90
+ <string>Profil fotoğrafı için kameraya erişim gerekiyor.</string>
91
+ ```
92
+
93
+ **Windows** — Yönetici hakları gereksiz yere istenmez: `requestedExecutionLevel: "asInvoker"`
94
+
95
+ ---
96
+
97
+ ## Auto-Update & Rollback
98
+
99
+ ```typescript
100
+ import { autoUpdater } from 'electron-updater';
101
+
102
+ autoUpdater.checkForUpdatesAndNotify();
103
+
104
+ autoUpdater.on('update-downloaded', () => {
105
+ dialog.showMessageBox({ message: 'Güncelleme hazır. Yüklensin mi?',
106
+ buttons: ['Evet', 'Sonra'] }).then(({ response }) => {
107
+ if (response === 0) autoUpdater.quitAndInstall();
108
+ });
109
+ });
110
+
111
+ // Rollback: güncelleme başarısız → önceki binary'ye dön, kullanıcıyı bilgilendir
112
+ autoUpdater.on('error', (error) => {
113
+ logger.error({ error }, 'Auto-update başarısız, önceki sürüm korunuyor.');
114
+ });
115
+ ```
116
+
117
+ ---
118
+
119
+ ## Tray & Stealth Mode
120
+
121
+ ```typescript
122
+ const tray = new Tray(iconPath);
123
+ tray.setContextMenu(Menu.buildFromTemplate([
124
+ { label: 'Aç', click: () => mainWindow.show() },
125
+ { label: 'Çık', click: () => app.quit() },
126
+ ]));
127
+
128
+ // Pencereyi kapatma — sadece gizle
129
+ mainWindow.on('close', (e) => { e.preventDefault(); mainWindow.hide(); });
130
+ ```
131
+
132
+ ---
133
+
134
+ ## Güvenlik Testleri (Playwright + Electron — Zorunlu)
135
+
136
+ ```typescript
137
+ // Context Isolation testi
138
+ test('renderer should not access Node.js APIs', async () => {
139
+ const hasNode = await page.evaluate(() => typeof require !== 'undefined');
140
+ expect(hasNode).toBe(false);
141
+ });
142
+
143
+ // Untrusted origin IPC reddi testi
144
+ test('untrusted IPC call should be rejected', async () => {
145
+ // origin doğrulaması test edilir
146
+ });
147
+ ```
148
+
149
+ ---
150
+
151
+ ## KIRMIZI ÇİZGİLER
152
+
153
+ | Yasak | Gerekçe |
154
+ |---|---|
155
+ | `nodeIntegration: true` | Renderer'da Node erişimi — kritik açık |
156
+ | `contextIsolation: false` | XSS → RCE saldırı vektörü |
157
+ | IPC'de input validation yok | Injection riski |
158
+ | Tüm ipcRenderer'ı expose etmek | Saldırı yüzeyi maksimum |
159
+ | Rollback'siz auto-update | Bozuk güncelleme kullanıcıyı kitler |
160
+ | Remote module kullanmak | Deprecated, güvenlik açığı |
161
+
162
+ ---
163
+
164
+ **Agent Completion Report** (v2.2.1)
165
+ - Mock kullanıldı mı? [ ] Hayır / [ ] Evet
166
+ - shared-types değişti mi? [ ] Hayır / [ ] Evet
167
+ - **API kontratı okundu mu? [ ] Hayır / [ ] Evet → .gemini/docs/api/[domain].md**
168
+ - Log yazıldı mı? [ ] Hayır / [ ] Evet → .gemini/logs/native.json
169
+ - **PROJECT_MEMORY HISTORY güncellendi mi? [ ] Hayır / [ ] Evet**
170
+ - Bir sonraki adım: [ne yapılmalı]
171
+ - Blokajlar: [varsa yaz, yoksa "YOK"]
172
+ ---
@@ -0,0 +1,36 @@
1
+ # 🌐 PROJECT WIKI
2
+
3
+ Bu Wiki, projenin merkezi bilgi kaynağıdır. Tüm ajanlar bu dökümanları referans alarak çalışmalıdır.
4
+
5
+ ## 📌 Hızlı Erişim
6
+
7
+ - **[Project Memory](.gemini/PROJECT_MEMORY.md):** Projenin anlık durumu, kararlar ve geçmiş.
8
+ - **[Tech Stack](.gemini/docs/tech-stack.md):** Kullanılan teknolojiler ve standartlar.
9
+ - **[API Contract Hub](.gemini/docs/api/README.md):** Backend endpoint kontratları — @frontend buradan okur.
10
+ - [Agent Interaction](.gemini/docs/agent-interaction.md): Ajanlar arası koordinasyon ve iletişim kuralları.
11
+ - [Project Docs](.gemini/docs/project-docs.md): Kullanıcı tarafından sağlanan proje detayları.
12
+
13
+ ## 🏗️ Proje Mimarisi
14
+
15
+ Proje, `@manager` tarafından orkestre edilen, `@frontend`, `@backend` ve `@analyst` ajanlarının kolaboratif çalışmasıyla yürütülmektedir.
16
+
17
+ ## 🔄 Ajan İletişim Akışı
18
+
19
+ ```
20
+ @backend → endpoint yazar → .gemini/docs/api/[domain].md günceller
21
+ @frontend → .gemini/docs/api/ okur → API çağrısı yazar
22
+ @analyst → kontrat bütünlüğünü denetler → HISTORY günceller
23
+ @manager → Trace ID üretir → ajanları Briefing ile görevlendirir
24
+ ```
25
+
26
+ ## 📜 Temel Kurallar (Supreme Law)
27
+
28
+ 1. **Contract-First:** Backend yazar → kontrat → Frontend okur → kodlar.
29
+ 2. **Zero Mock:** Gerçekçi veri kullanımı.
30
+ 3. **Supreme Aesthetics:** Frontend için en yüksek görsel kalite.
31
+ 4. **Structured Logging:** Tüm işlemler `.gemini/logs/` altında kayıt altına alınır.
32
+ 5. **Memory Protocol:** Her oturum başı PROJECT_MEMORY okur, her oturum sonu HISTORY yazar.
33
+
34
+ ---
35
+
36
+ _Son Güncelleme: 2026-05-05_
@@ -0,0 +1,22 @@
1
+ # Agent Interaction & Coordination
2
+
3
+ ## Roles & Responsibility Matrix
4
+ | Component | Primary Owner | Secondary |
5
+ |---|---|---|
6
+ | `apps/backend/` | @backend | @analyst |
7
+ | `apps/web/` | @frontend | @analyst |
8
+ | `packages/shared-types/` | @backend | @frontend |
9
+ | `.gemini/PROJECT_MEMORY.md` | @analyst | All (History only) |
10
+
11
+ ## Communication Protocol
12
+ 1. **Trace ID:** Her görev için @manager tarafından benzersiz bir UUID üretilir.
13
+ 2. **Shared Types:** Backend ve Frontend kodlamaya başlamadan önce tiplerde anlaşmalıdır.
14
+ 3. **Project Docs:** Projenin kapsamı [project-docs.md](file:///Users/ybekar/Desktop/Projeler/base/.gemini/docs/project-docs.md) üzerinden takip edilir. Kullanıcının ilettiği tüm detaylar buradadır.
15
+ 4. **Project Memory:** Her oturum başında okunur, her oturum sonunda "HISTORY" kısmına özet eklenir.
16
+
17
+ ## State Machine
18
+ - **PHASE_0 (Discovery):** Gereksinimlerin netleştirilmesi.
19
+ - **PHASE_1 (Architecture):** Kontratların (Shared Types) oluşturulması.
20
+ - **PHASE_2 (Development):** Özelliklerin geliştirilmesi.
21
+ - **PHASE_3 (Integration):** Entegrasyon testleri.
22
+ - **PHASE_4 (Deployment):** Canlıya çıkış.
@@ -0,0 +1,84 @@
1
+ # 📡 API Contract Hub
2
+
3
+ Bu klasör, **@backend** tarafından yazılan tüm endpoint'lerin belgesidir.
4
+ **@frontend** bu klasörü okumadan herhangi bir API çağrısı yazamaz.
5
+
6
+ > **Kural:** Backend bir endpoint yazar → bu dosyayı günceller → Frontend okur → kodlar.
7
+ > Kontrat olmadan çalışmak yasaktır.
8
+
9
+ ---
10
+
11
+ ## 📋 Endpoint Listesi (İndeks)
12
+
13
+ | Domain | Dosya | Endpoint Sayısı | Son Güncelleme |
14
+ |---|---|---|---|
15
+ | *(Henüz endpoint yok)* | — | — | — |
16
+
17
+ ---
18
+
19
+ ## 📌 Nasıl Kullanılır?
20
+
21
+ ### @backend için
22
+ 1. Yeni endpoint yazdığında → `[domain].md` dosyası oluştur/güncelle
23
+ 2. Yukarıdaki tabloyu güncelle
24
+ 3. `shared-types` değiştiyse `contract.version.json` hash'ini güncelle
25
+
26
+ ### @frontend için
27
+ 1. Oturum başında bu dosyayı oku
28
+ 2. Kullanacağın endpoint'in `[domain].md` dosyasını aç
29
+ 3. Kontrat yoksa → `@backend`'e bildir, tahmin üzerinden çalışma
30
+
31
+ ---
32
+
33
+ ## 🗂️ Domain Dosyaları
34
+
35
+ *(Henüz oluşturulmadı. @backend ilk endpoint'ini yazdığında buraya eklenecek.)*
36
+
37
+ ---
38
+
39
+ ## 📝 Endpoint Belgeleme Şablonu
40
+
41
+ Her `[domain].md` dosyası şu formatı kullanır:
42
+
43
+ ```markdown
44
+ # [Domain] API — Kontrat
45
+
46
+ ## Endpoint Listesi
47
+ - [GET] /api/[path] — Kısa açıklama
48
+ - [POST] /api/[path] — Kısa açıklama
49
+
50
+ ---
51
+
52
+ ### [METHOD] /api/[path]
53
+ - **Açıklama:** Bu endpoint ne yapar?
54
+ - **Auth:** Gerekli mi? Hangi rol? (örn: Bearer Token, Admin)
55
+ - **Request Body:**
56
+ ```typescript
57
+ interface CreateXxxDTO {
58
+ field: string;
59
+ }
60
+ ```
61
+ - **Query Params:** `?page=1&limit=20`
62
+ - **Response (200):**
63
+ ```typescript
64
+ interface XxxResponse {
65
+ id: string;
66
+ field: string;
67
+ createdAt: string;
68
+ }
69
+ ```
70
+ - **Hata Kodları:**
71
+ - `400` — Geçersiz istek
72
+ - `401` — Auth gerekli
73
+ - `404` — Kaynak bulunamadı
74
+ - `409` — Çakışma
75
+ - `500` — Sunucu hatası
76
+ - **shared-types Referansı:** `CreateXxxDTO`, `XxxResponse`
77
+ - **Son Güncelleme:** YYYY-MM-DD
78
+ - **Trace ID:** [uuid]
79
+ ```
80
+
81
+ ---
82
+
83
+ *Son güncelleme: —*
84
+ *Sorumlu: @backend (yazma) / @frontend (okuma)*
@@ -0,0 +1,16 @@
1
+ # 📂 Project Docs (Ajan Yetenek Geliştirme)
2
+
3
+ Bu döküman, ajanların yeteneklerini test etmek, geliştirmek ve yeni disiplinler kazandırmak için kullanılan senaryoları içerir.
4
+
5
+ ## 🎯 Temel Hedef
6
+ Ajanların (Manager, Explorer, Backend, Frontend, Analyst) birbirleriyle olan koordinasyonunu, araç kullanım verimliliğini ve "Supreme Performance" standartlarına uyumunu maksimize etmek.
7
+
8
+ ## 🧪 Aktif Geliştirme Senaryosu
9
+ - **Senaryo Adı:** "Agent Skill Sandbox"
10
+ - **Kapsam:** Ajanların MCP araçlarını (framework-mcp) kullanarak karmaşık bağımlılıkları çözme ve contract-first yaklaşımını uygulama becerilerinin test edilmesi.
11
+ - **Odak Alanı:**
12
+ - @explorer: Derin kod arama ve bağımlılık haritalama.
13
+ - @backend & @frontend: `shared-types` üzerinden hatasız kontrat yönetimi.
14
+
15
+ ## 🛠️ Deney Notları
16
+ *(Ajanların performansı ve geliştirilmesi gereken alanlar buraya not edilecektir.)*
@@ -0,0 +1,31 @@
1
+ # Tech Stack & Standards
2
+
3
+ ## Core Technologies
4
+
5
+ - **Frontend:** React 19 + Vite (SPA)
6
+ - **Icons:** Lucide Icons (`lucide-react`)
7
+ - **State Management:** Zustand
8
+ - **Styling:** Tailwind CSS + "Supreme Frontend Aesthetics" Guidelines
9
+
10
+ ## Design System (Adaptive Palette)
11
+
12
+ - **Strategy:** Proje bağlamına özel, dinamik renk paleti üretimi.
13
+ - **Modes:** Native Dark & Light mode desteği zorunludur.
14
+ - **Generation:** `@frontend` ajanı, `project-docs.md` içindeki marka kimliğine göre paleti kendi belirler.
15
+ - **Standard:** Tüm renkler CSS değişkenleri (`--color-*`) üzerinden yönetilmeli, hardcoded değerlerden kaçınılmalıdır.
16
+
17
+ ## Architectural Standards
18
+
19
+ - **Backend:** Node.js 20+ + Fastify
20
+ - **Database:** PostgreSQL
21
+ - **Query Builder:** Kysely
22
+ - **Contract-First:** `packages/shared-types` üzerinden ortak tip tanımları.
23
+ - **Branded Types:** Tüm ID'ler markalı tip olmalıdır.
24
+ - **Zero Mock Policy:** Sahte veri yerine gerçek DB/Sandbox kullanımı.
25
+ - **Logging:** Yapısal JSON loglama (`.gemini/logs/`).
26
+
27
+ ## Environment Management
28
+
29
+ - `.env.development` (Yerel)
30
+ - `.env.test` (CI)
31
+ - `.env.production` (Deployment)
package/CLAUDE.md ADDED
@@ -0,0 +1,39 @@
1
+ # AI Agent Framework — Claude Code Adapter (v1.0.5)
2
+
3
+ This file is the Claude Code adapter layer.
4
+ Core framework rules and agent capabilities are defined in `./Gemini.md`.
5
+
6
+ ## Mandatory Startup
7
+
8
+ 1. Read `./Gemini.md` completely (single source of truth).
9
+ 2. Read `.gemini/PROJECT_MEMORY.md` (`MEVCUT DURUM`, `AKTİF GÖREVLER`, `HISTORY`).
10
+ 3. Read relevant SOP files in `.gemini/agents/`.
11
+ 4. Use MCP tools before opening files directly when possible.
12
+
13
+ ## Agent Capability Preservation Rule
14
+
15
+ - Do not redefine agent roles in this file.
16
+ - Do not fork or duplicate `.gemini/agents/*` content.
17
+ - Treat `.gemini/agents/*` as the canonical skill source for all clients.
18
+
19
+ ## Claude-Specific Notes
20
+
21
+ - Follow Claude Code conventions for tool usage and file edits.
22
+ - Keep outputs aligned with the same phase discipline from `Gemini.md`.
23
+ - If any instruction conflicts, `Gemini.md` has higher priority.
24
+
25
+ ## MCP (Claude Code)
26
+
27
+ Use the existing MCP server configuration and tools:
28
+ - `get_framework_status`
29
+ - `search_codebase`
30
+ - `analyze_dependencies`
31
+ - `get_memory_insights`
32
+ - `get_project_gaps`
33
+ - `security_audit_scan`
34
+
35
+ ## Completion Requirement
36
+
37
+ At the end of each substantial task:
38
+ 1. Update `.gemini/PROJECT_MEMORY.md` history.
39
+ 2. Keep trace and phase fields consistent with performed work.
package/CODEX.md ADDED
@@ -0,0 +1,33 @@
1
+ # AI Agent Framework — Codex Adapter (v1.0.5)
2
+
3
+ This file is the Codex adapter layer.
4
+ Core framework rules and agent capabilities are defined in `./Gemini.md`.
5
+
6
+ ## Mandatory Startup
7
+
8
+ 1. Read `./Gemini.md` fully (single source of truth).
9
+ 2. Read `.gemini/PROJECT_MEMORY.md` (`MEVCUT DURUM`, `AKTİF GÖREVLER`, `HISTORY`).
10
+ 3. Read related SOP files in `.gemini/agents/`.
11
+ 4. Prefer MCP tools before direct file reads when possible.
12
+
13
+ ## Agent Capability Preservation Rule
14
+
15
+ - Do not duplicate agent role definitions here.
16
+ - Do not fork `.gemini/agents/*` into Codex-specific copies.
17
+ - Use `.gemini/agents/*` as the canonical capability source.
18
+
19
+ ## Codex-Specific Notes
20
+
21
+ - Follow Codex edit/validation workflow conventions.
22
+ - Keep phase discipline and reporting aligned with `Gemini.md`.
23
+ - If any conflict appears, `Gemini.md` has higher priority.
24
+
25
+ ## MCP
26
+
27
+ Use the same MCP toolset:
28
+ - `get_framework_status`
29
+ - `search_codebase`
30
+ - `analyze_dependencies`
31
+ - `get_memory_insights`
32
+ - `get_project_gaps`
33
+ - `security_audit_scan`
package/CURSOR.md ADDED
@@ -0,0 +1,33 @@
1
+ # AI Agent Framework — Cursor Adapter (v1.0.5)
2
+
3
+ This file is the Cursor adapter layer.
4
+ Core framework rules and agent capabilities are defined in `./Gemini.md`.
5
+
6
+ ## Mandatory Startup
7
+
8
+ 1. Read `./Gemini.md` fully (single source of truth).
9
+ 2. Read `.gemini/PROJECT_MEMORY.md` (`MEVCUT DURUM`, `AKTİF GÖREVLER`, `HISTORY`).
10
+ 3. Read related SOP files in `.gemini/agents/`.
11
+ 4. Prefer MCP tools before direct file reads when possible.
12
+
13
+ ## Agent Capability Preservation Rule
14
+
15
+ - Do not duplicate agent role definitions here.
16
+ - Do not fork `.gemini/agents/*` into Cursor-specific copies.
17
+ - Use `.gemini/agents/*` as the canonical capability source.
18
+
19
+ ## Cursor-Specific Notes
20
+
21
+ - Apply Cursor workflow conventions for edits and reviews.
22
+ - Keep phase discipline and reporting aligned with `Gemini.md`.
23
+ - If any conflict appears, `Gemini.md` has higher priority.
24
+
25
+ ## MCP
26
+
27
+ Use the same MCP toolset:
28
+ - `get_framework_status`
29
+ - `search_codebase`
30
+ - `analyze_dependencies`
31
+ - `get_memory_insights`
32
+ - `get_project_gaps`
33
+ - `security_audit_scan`