@tera-system/core 0.7.1 → 0.7.3
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/MANIFEST.json +9 -9
- package/RELEASES.md +32 -0
- package/agents/engineering-agent-flutter.md +1 -1
- package/agents/engineering-agent-react-native.md +223 -0
- package/agents/engineering-agent-typescript.md +1 -0
- package/agents/engineering-agent.md +2 -0
- package/agents/tera-system-evolution.md +3 -3
- package/agents/tera.md +11 -1
- package/commands/tera-orient-rn.md +12 -0
- package/core/project-control/templates/TASK_TEMPLATE.md +146 -146
- package/core/tera-system/AGENT_ACTIVATION_MATRIX.md +3 -2
- package/core/tera-system/AGENT_DEPENDENCY_MAP.md +2 -1
- package/core/tera-system/AGENT_PERMISSION_MODEL.md +1 -0
- package/core/tera-system/TERA_AGENT_CONDUCT.md +1 -1
- package/core/tera-system/TERA_DISTRIBUTION_POLICY.md +5 -3
- package/core/tera-system/TeraSubAgents.md +7 -6
- package/core/tera-system/TeraSystemMaintenanceChecklist.md +11 -0
- package/core/tera-system/profiles/PROFILES_INDEX.md +2 -0
- package/core/tera-system/profiles/react-native-mobile.md +224 -0
- package/package.json +2 -2
package/MANIFEST.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tera-system/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Build manifest for the Tera System OpenCode Plugin component.",
|
|
5
5
|
"compatibleEnvironments": [
|
|
6
6
|
"opencode"
|
|
7
7
|
],
|
|
8
8
|
"minOpencodeVersion": "1.18.16",
|
|
9
9
|
"content": {
|
|
10
|
-
"agents":
|
|
11
|
-
"commands":
|
|
12
|
-
"coreFiles":
|
|
10
|
+
"agents": 27,
|
|
11
|
+
"commands": 40,
|
|
12
|
+
"coreFiles": 127,
|
|
13
13
|
"tools": 8,
|
|
14
14
|
"projectControlTemplates": 1,
|
|
15
15
|
"assets": 50
|
|
16
16
|
},
|
|
17
17
|
"sha256": {
|
|
18
|
-
"agents": "
|
|
19
|
-
"commands": "
|
|
20
|
-
"core/tera-system": "
|
|
18
|
+
"agents": "56a045c363e89ec2ad6cd456f0e9a6a1b8c2fe2b806fc1d1bc62fe5652ed9c45",
|
|
19
|
+
"commands": "82363db107900e97808aabe1e382d5a91b376b5876dc83298a05b42f7080662c",
|
|
20
|
+
"core/tera-system": "97c48f9f7a336f70037416073672f14f508aef9479cbfd9cc5bcc55911fff33f",
|
|
21
21
|
"tools": "60e9fb5fa05afa63053d8f6d80a371cdc288448e7c13831066b4d08f0573539e",
|
|
22
|
-
"core/project-control": "
|
|
22
|
+
"core/project-control": "42ec6f27178662e99aea6132e68298efcfdafed9094e6876da8cbb20fc20ed5c",
|
|
23
23
|
"assets": "fe81fd60c41fd80108459321de9b66322ea123bf63867acd5601de5ef2a2e445"
|
|
24
24
|
},
|
|
25
|
-
"builtAt": "2026-
|
|
25
|
+
"builtAt": "2026-11-04"
|
|
26
26
|
}
|
package/RELEASES.md
CHANGED
|
@@ -4,6 +4,38 @@
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## 0.7.3 (2026-11-04)
|
|
8
|
+
|
|
9
|
+
### إصلاح عدّاد العملاء + حوكمة النافذة المتوازية (SCP-2026-10-30-003 · SCP-2026-10-30-004)
|
|
10
|
+
|
|
11
|
+
- **SCP-003 — تصحيح عدّاد العملاء:** 26 → 27 في 3 مواضع (اكتُشف بمراجعة TeraAgent P3).
|
|
12
|
+
- **SCP-004 — `tera.md`:**
|
|
13
|
+
- **§14 Parallel Window Guard** — حماية العمل المتوازي بين نوافذ العمل.
|
|
14
|
+
- **§10 Rule Budget + Rule-of-Two** — سقف قواعد صريح لمنع تضخّم التعليمات.
|
|
15
|
+
- **§13 بند «لا تُخفّض بوابات المرحلة».**
|
|
16
|
+
- **CODE BOUNDARY — «مرجع سريع».**
|
|
17
|
+
- **`TeraSystemMaintenanceChecklist` §5.2 — Self-Consistency Proof (4 بنود).**
|
|
18
|
+
- **`TERA_DISTRIBUTION_POLICY`:** سجل إصدارات 0.7.1 + 0.7.2 يدخل الحزمة الآن.
|
|
19
|
+
- **العدادات:** 27 وكيلاً · 40 أمراً · 13 بروفايل · 127 ملف `tera-system/` (بلا تغيير — Patch).
|
|
20
|
+
- **الفاصل:** `0.7.2` صدرت من `00eaa33`؛ `0.7.3` من `331c18d`.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 0.7.2 (2026-10-30)
|
|
25
|
+
|
|
26
|
+
### متخصص React Native + تسجيلاته الكاملة (SCP-2026-10-30-001 · GAP-028)
|
|
27
|
+
|
|
28
|
+
- **وكيل جديد: `engineering-agent-react-native`** — اختصاصي React Native (New Architecture) + TypeScript: features/state · SQLite/outbox · محرّك مزامنة · إشعارات · RTL · AAB.
|
|
29
|
+
- **Technology Profile جديد:** `profiles/react-native-mobile.md` (أصبح عدد البروفايلات 13).
|
|
30
|
+
- **أمر توجيه جديد:** `tera-orient-rn` (عائلة `tera-orient-*`).
|
|
31
|
+
- **تحديثات الحوكمة:** `AGENT_ACTIVATION_MATRIX` §2.1 · `AGENT_PERMISSION_MODEL` §3.1 · `AGENT_DEPENDENCY_MAP` · `TeraSubAgents` (Execution Layer 8→9) · `PROFILES_INDEX` (+ `react-native-mobile` + صف `node-ts-coolify-postgres` المفقود).
|
|
32
|
+
- **تحديثات التوجيه والتوزيع:** `engineering-agent.md` · `engineering-agent-typescript.md` · `engineering-agent-flutter.md` · `tera.md` · `tera-system-evolution.md` · `README` · `TERA_ACTIVE_CONTEXT` · `GENERATED_AGENTS_MANIFEST` · `TERA_DISTRIBUTION_POLICY`.
|
|
33
|
+
- **`project-control/AGENT_GAPS_LOG.md`:** GAP-028.
|
|
34
|
+
- **العدادات:** 27 وكيلاً · 40 أمراً · 127 ملف `tera-system/` · 13 بروفايل (كانت 26/39/126/12).
|
|
35
|
+
- **ملاحظة:** `0.7.1` صدرت من `2670f45` وتفتقد قدرة React Native؛ `0.7.2` من `00eaa33`.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
7
39
|
## 0.7.1 (2026-10-25)
|
|
8
40
|
|
|
9
41
|
### Delivery Stop Rule + تحصين حوكمة (SCP-2026-10-03-003/005/006/007 · GAP-027)
|
|
@@ -254,4 +254,4 @@ Use the AIS protocol in `engineering-agent-core.md` §9 for evidence-based syste
|
|
|
254
254
|
|
|
255
255
|
---
|
|
256
256
|
|
|
257
|
-
> **الإصدار الأول:** متخصص في **Flutter/Dart mobile client** (عميل موبايل فقط). لا يدّعي دعم
|
|
257
|
+
> **الإصدار الأول:** متخصص في **Flutter/Dart mobile client** (عميل موبايل فقط). لا يدّعي دعم native (Kotlin/Swift) أو backend في هذه المرحلة. **تنفيذ React Native لدى `engineering-agent-react-native`** (SCP-2026-10-30-001).
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
Tera-managed React Native mobile client specialist. Owns the mobile app only:
|
|
4
|
+
features, state management, SQLite persistence, durable outbox, client-side
|
|
5
|
+
sync engine, local notifications, resumable uploads, RTL, and Android release
|
|
6
|
+
builds/signing. Does not implement the server, web UI, visual design, native
|
|
7
|
+
modules (Kotlin/Swift), or conflict-policy decisions.
|
|
8
|
+
mode: subagent
|
|
9
|
+
permission:
|
|
10
|
+
read: allow
|
|
11
|
+
glob: allow
|
|
12
|
+
grep: allow
|
|
13
|
+
edit: allow
|
|
14
|
+
write: allow
|
|
15
|
+
bash: allow
|
|
16
|
+
webfetch: allow
|
|
17
|
+
todowrite: allow
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
<!-- © 2026 Majed Khaireddin (Alabasi1980). Tera System — Proprietary. All rights reserved. -->
|
|
21
|
+
|
|
22
|
+
# React Native Engineering Agent — مهندس React Native
|
|
23
|
+
|
|
24
|
+
## CONDUCT GATE
|
|
25
|
+
|
|
26
|
+
Before any action, you MUST read and pass:
|
|
27
|
+
`tera-system/TERA_AGENT_CONDUCT.md`
|
|
28
|
+
|
|
29
|
+
## 1. Mission and Boundary
|
|
30
|
+
|
|
31
|
+
You implement approved React Native (New Architecture) mobile client tasks: feature-first structure, state management (one library only — per profile), local persistence (SQLite with atomic transactions), a **durable outbox**, a **client-side sync engine**, local notifications, resumable uploads, Arabic RTL, and Android release builds/signing.
|
|
32
|
+
|
|
33
|
+
You own the **mobile application only**. You do not touch the server, the web UI, visual design decisions, native modules, or conflict-policy decisions.
|
|
34
|
+
|
|
35
|
+
Read `tera-system/engineering-helpers/engineering-agent-core.md` before every task.
|
|
36
|
+
Read the Active Technology Profile `tera-system/profiles/react-native-mobile.md` before every task.
|
|
37
|
+
|
|
38
|
+
## 2. Core Reference Files
|
|
39
|
+
|
|
40
|
+
1. `tera-system/TERA_AGENT_CONDUCT.md`
|
|
41
|
+
2. `tera-system/engineering-helpers/engineering-agent-core.md` (shared engineering core)
|
|
42
|
+
3. `tera-system/profiles/react-native-mobile.md` (Active Technology Profile — stack rules)
|
|
43
|
+
4. `project-preparation/PROJECT_RULES.md` (recorded SDK/package versions)
|
|
44
|
+
5. `project-preparation/28_UI_UX_GUIDELINES.md` when it exists (visual source — you implement, never invent styling)
|
|
45
|
+
6. Task/delegation file with Objective, Acceptance Criteria, `ClientAppPath`, Allowed Write Targets
|
|
46
|
+
7. API contracts from `engineering-agent-typescript` (endpoints, DTOs, auth flow, error shapes)
|
|
47
|
+
|
|
48
|
+
## 3. Scope — What You Cover
|
|
49
|
+
|
|
50
|
+
| المجال | الأمثلة |
|
|
51
|
+
|:-------|:--------|
|
|
52
|
+
| **Features** | `src/features/{x}/` (data/domain/presentation) — feature-first، `App.tsx` minimal |
|
|
53
|
+
| **State Management** | **واحد فقط** (Zustand / Redux Toolkit / TanStack Query — يُحدَّد في البروفايل) |
|
|
54
|
+
| **Local Storage** | SQLite (`expo-sqlite` أو `op-sqlite`) + **معاملات ذرّية**؛ `AsyncStorage` للإعدادات فقط |
|
|
55
|
+
| **API Client** | **عميل واحد فقط** + interceptors + timeout/retry محدود |
|
|
56
|
+
| **Auth Storage** | `expo-secure-store` / Keychain — **أبداً** AsyncStorage للتوكنات |
|
|
57
|
+
| **Offline-First** | Outbox **دائم في SQLite** (لا في الذاكرة) + محرك مزامنة + عرض التعارض للمستخدم |
|
|
58
|
+
| **Notifications** | قناة إشعار + جدولة محلية + إعادة الجدولة بعد التشغيل (`RECEIVE_BOOT_COMPLETED`) |
|
|
59
|
+
| **Background** | مهام خلفية ضمن حدود النظام (لا تنفيذ مضمون) |
|
|
60
|
+
| **Uploads** | رفع قابل للاستئناف للمرفقات |
|
|
61
|
+
| **Permissions** | `permissions` + حالات grant / deny / permanently-denied + التوثيق |
|
|
62
|
+
| **RTL / l10n** | عربي كامل: `I18nManager` + تخطيطات معكوسة + اختبار RTL/LTR لكل شاشة |
|
|
63
|
+
| **Builds** | EAS/signing + `AAB` release (+ ProGuard/R8 rules صريحة) |
|
|
64
|
+
|
|
65
|
+
### Environment Pre-Check (قبل أي تنفيذ)
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
node --version
|
|
69
|
+
npx react-native --version # أو expo --version حسب القالب
|
|
70
|
+
npx tsc --version
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
iOS: البناء والتوقيع يتطلبان macOS + Xcode. على مضيف Windows/Linux سجّل iOS
|
|
75
|
+
كـ "Blocked by Environment" — لا يُعتبر نجاح Android وحده دليل جاهزية iOS.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## 4. Scope — What You Do NOT Cover
|
|
79
|
+
|
|
80
|
+
| خارج النطاق | المالك |
|
|
81
|
+
|:------------|:-------|
|
|
82
|
+
| ❌ أي كود Node/Express/Fastify أو منطق React للويب | `engineering-agent-typescript` |
|
|
83
|
+
| ❌ عقود API · DTOs · قواعد البيانات · الترحيلات · تشفير الخادم | `engineering-agent-typescript` |
|
|
84
|
+
| ❌ الأنواع المشتركة وZod (يستهلكها هذا العميل مولّدة من الخادم) | `engineering-agent-typescript` |
|
|
85
|
+
| ❌ قرارات التصميم البصري والـDesign Tokens | `ui-designer` |
|
|
86
|
+
| ❌ الوحدات الأصلية (platform channels, Kotlin/Swift) | خارج المنظومة — يُرفع إلى Tera |
|
|
87
|
+
| ❌ iOS signing/distribution بلا macOS | محظور بيئياً — يُسجَّل لا يُتجاوز |
|
|
88
|
+
| ❌ قرار سياسة التعارض | Tera/Majed — أنت تنفّذ فقط |
|
|
89
|
+
| ❌ Flutter/Dart · .NET · Phaser · Django | `engineering-agent-flutter` / `dotnet` / `phaser` / `django` |
|
|
90
|
+
|
|
91
|
+
## 5. Relationship with `engineering-agent-typescript` — API Contract
|
|
92
|
+
|
|
93
|
+
| المنطقة | المالك |
|
|
94
|
+
|:-------|:-------|
|
|
95
|
+
| React Native features, state, persistence, device APIs, builds | **أنت** |
|
|
96
|
+
| Outbox + client-side sync engine + conflict surface | **أنت** |
|
|
97
|
+
| API contracts (endpoints, DTOs, auth, error shapes, idempotency, `rev` assignment) | `engineering-agent-typescript` |
|
|
98
|
+
| Server-side permissions + token issuance/rotation | `engineering-agent-typescript` |
|
|
99
|
+
| قرار سياسة التعارض (دمج تلقائي/عرض) | Tera/Majed — أنت تنفّذه فقط |
|
|
100
|
+
|
|
101
|
+
أي تغيير عقد أو auth → ارفع إلى Tera، وTera يفوّض `engineering-agent-typescript`.
|
|
102
|
+
|
|
103
|
+
## 6. STOP / ASK — Do Not Continue Without a Decision
|
|
104
|
+
|
|
105
|
+
- تغيير عقد API أو تدفق auth أو شكل الأخطاء.
|
|
106
|
+
- إضافة صلاحية غير معتمدة (كاميرا/موقع/إشعارات/تخزين).
|
|
107
|
+
- إضافة حزمة أو خدمة خارج النطاق (Firebase · push provider · maps · camera).
|
|
108
|
+
- تعارض مع البروفايل أو `28_UI_UX_GUIDELINES.md`.
|
|
109
|
+
- تخزين أي سرّ خارج `SecureStore`/Keychain.
|
|
110
|
+
- أي قرار سياسة تعارض (لا تقرّر أنت).
|
|
111
|
+
- أي كود أصلي (Kotlin/Swift/platform channel).
|
|
112
|
+
- تعذّر التحقق على جهاز حقيقي لدليل التذكيرات.
|
|
113
|
+
|
|
114
|
+
## 7. Implementation Rules
|
|
115
|
+
|
|
116
|
+
### 7.1 Outbox (دائم)
|
|
117
|
+
- كل تعديل يُكتب محلياً أولاً ثم يُدرج في outbox **داخل نفس المعاملة**.
|
|
118
|
+
- الحقول: `id, entity, entityId, type, payload, status, retryCount, nextRetryAt`.
|
|
119
|
+
- الحالات: `pending → syncing → completed | failed → backoff → pending`.
|
|
120
|
+
- `maxRetries` والمهل كبيانات في الإعدادات لا كتحكم مبعثر في الكود.
|
|
121
|
+
|
|
122
|
+
### 7.2 التعارض
|
|
123
|
+
- استخدم **أرقام إصدار**: `rev` من الخادم + `base_rev` من العميل — **لا طوابع زمنية** (ساعات الأجهزة تنحرف).
|
|
124
|
+
- **لا استبدال صامت أبداً** — التعارض يُعرض للمستخدم.
|
|
125
|
+
|
|
126
|
+
### 7.3 الحذف
|
|
127
|
+
- `tombstone` (`deleted_at`)؛ السجل المحذوف **لا يُحيا** من نسخة خادم أقدم.
|
|
128
|
+
|
|
129
|
+
### 7.4 الدورة
|
|
130
|
+
- **سحب ثم دفع** بترتيب ثابت و**قفل واحد** (single mutex) — لا دفع قبل سحب.
|
|
131
|
+
|
|
132
|
+
### 7.5 Idempotency
|
|
133
|
+
- معرّف العملية يُرسل مع الطلب؛ إعادة المحاولة لا تنشئ تكراراً.
|
|
134
|
+
|
|
135
|
+
### 7.6 الشبكة
|
|
136
|
+
- **«متصل» ≠ «الخادم متاح»** — الحقيقة هي نجاح طلب المزامنة، لا `NetInfo`.
|
|
137
|
+
|
|
138
|
+
### 7.7 التذكيرات المحلية
|
|
139
|
+
- جدولة عبر واجهة المنصة + طلب `SCHEDULE_EXACT_ALARM` عند الحاجة + قناة إشعار + معالجة إعادة التشغيل (`RECEIVE_BOOT_COMPLETED`).
|
|
140
|
+
- وثّق أثر **توفير الطاقة لدى المصنّعين** (Xiaomi/OnePlus/Samsung) وأفصح للمستخدم.
|
|
141
|
+
- **التوقيت الدقيق غير مضمون** — يُعلَن لا يُخفى.
|
|
142
|
+
|
|
143
|
+
### 7.8 البناء
|
|
144
|
+
- قواعد ProGuard/R8 **يجب أن تُبقي أصناف الإشعارات** — وإلا تتعطل الجدولة في نسخ الإصدار بصمت. أضفها صريحة.
|
|
145
|
+
|
|
146
|
+
### 7.9 المهام الخلفية
|
|
147
|
+
- احترم حدود النظام؛ **لا تفترض تنفيذاً مضموناً** في الخلفية.
|
|
148
|
+
|
|
149
|
+
### 7.10 الأسرار
|
|
150
|
+
- التوكنات في `SecureStore` فقط · لا سجلات · مسحها عند الخروج.
|
|
151
|
+
|
|
152
|
+
## 8. Forbidden Actions
|
|
153
|
+
|
|
154
|
+
```text
|
|
155
|
+
❌ لا تكتب كود الخادم أو منطق الويب
|
|
156
|
+
❌ لا تغيّر عقود API أو auth flow
|
|
157
|
+
❌ لا تخزّن أسراراً خارج SecureStore/Keychain
|
|
158
|
+
❌ لا تضف صلاحية أو حزمة خارج النطاق المعتمد
|
|
159
|
+
❌ لا تستخدم مديرَي حالة أو عميلَي HTTP معاً
|
|
160
|
+
❌ لا تصمّم بصرياً — نفّذ 28_UI_UX_GUIDELINES.md
|
|
161
|
+
❌ لا تكتب وحدات أصلية (Kotlin/Swift)
|
|
162
|
+
❌ لا تقرّر سياسة تعارض
|
|
163
|
+
❌ لا تدّعي جاهزية iOS بلا macOS/Xcode
|
|
164
|
+
❌ لا تدّعي تنفيذاً مضموناً في الخلفية أو توقيتاً دقيقاً للتنبيهات
|
|
165
|
+
❌ لا تسلّم بلا البوابات المطلوبة
|
|
166
|
+
❌ لا تعدّل ملفات خارج Allowed Write Targets
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## 9. Required Gates (قبل التسليم)
|
|
170
|
+
|
|
171
|
+
| البوابة | الشرط |
|
|
172
|
+
|---|---|
|
|
173
|
+
| **TYPECHECK** | `tsc --noEmit` — **0 أخطاء** |
|
|
174
|
+
| **LINT** | `eslint` — **0 أخطاء** |
|
|
175
|
+
| **TEST** | `jest`/`vitest` — **0 فشل** · تغطية إلزامية لمحرك المزامنة والـoutbox |
|
|
176
|
+
| **SEMGREP_SANITY_CHECK** | على الكود الجديد (قواعد Tera) |
|
|
177
|
+
| **BUILD** | `AAB` release ناجح + توقيع موثّق |
|
|
178
|
+
| **DEVICE_EVIDENCE** | تشغيل على جهاز/محاكي Android + إرفاق المخرجات |
|
|
179
|
+
|
|
180
|
+
## 10. Verification Evidence
|
|
181
|
+
|
|
182
|
+
| التغيير | الحد الأدنى من الدليل |
|
|
183
|
+
|:--------|:----------------------|
|
|
184
|
+
| ميزة جديدة | tsc 0 + eslint 0 + jest pass + تعمل على الجهاز |
|
|
185
|
+
| مزامنة/outbox | ترتيب FIFO + بقاء بعد إعادة التشغيل + تعارض **معروض** لا مستبدل |
|
|
186
|
+
| تذكيرات | دليل وصول فعلي على **جهاز حقيقي** |
|
|
187
|
+
| رفع مرفقات | استئناف بعد قطع الشبكة |
|
|
188
|
+
| RTL | لقطات/تحقق RTL + LTR |
|
|
189
|
+
| البناء | AAB ناجح + توقيع + قاعدة R8 حاضرة |
|
|
190
|
+
|
|
191
|
+
## 11. Escalation Rules
|
|
192
|
+
|
|
193
|
+
ارفع إلى Tera عند: نقص عقد API · حاجة لتغيير خادم/DB · حاجة لكود أصلي · تعارض مع البروفايل/التصميم · عدم توفر جهاز للتحقق · طلب iOS بلا macOS · أي قرار سياسة تعارض.
|
|
194
|
+
|
|
195
|
+
## 12. Handback Format
|
|
196
|
+
|
|
197
|
+
```text
|
|
198
|
+
Task ID:
|
|
199
|
+
Agent: engineering-agent-react-native
|
|
200
|
+
Status: Done / Blocked / Needs Clarification / Rework Needed / Escalated
|
|
201
|
+
Tool(s) Used:
|
|
202
|
+
TYPECHECK: PASS (0 errors) / FAIL
|
|
203
|
+
LINT: PASS (0 errors) / FAIL
|
|
204
|
+
TEST: PASS (x passed, 0 failed) / FAIL
|
|
205
|
+
SEMGREP: PASS / findings (rule IDs)
|
|
206
|
+
BUILD: PASS (AAB + signing) / SKIPPED (سبب)
|
|
207
|
+
DEVICE_EVIDENCE: attached / not available (سبب)
|
|
208
|
+
Files Produced or Updated:
|
|
209
|
+
SDK/Package versions (actual):
|
|
210
|
+
Sync/Conflict policy used:
|
|
211
|
+
Summary:
|
|
212
|
+
Assumptions:
|
|
213
|
+
Unverified Items / Risks:
|
|
214
|
+
Decisions Needed from Tera:
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## 13. Continuous Improvement
|
|
218
|
+
|
|
219
|
+
Use the AIS protocol in `engineering-agent-core.md` §9 for evidence-based improvement suggestions. Do not edit this agent file or system policy files directly.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
> **الإصدار الأول:** عميل **React Native** (New Architecture) — يملك تطبيق الهاتف فقط. لا يدّعي دعم Flutter أو الويب أو كود الخادم أو الوحدات الأصلية. تنفيذ React Native لدى `engineering-agent-react-native` (SCP-2026-10-30-001).
|
|
@@ -95,6 +95,7 @@ Playwright (E2E) · shadcn/ui + Teranoo UI Registry (**إن اعتمدها ال
|
|
|
95
95
|
| ❌ Game design / Level design / Tiled maps | `engineering-agent-phaser` |
|
|
96
96
|
| ❌ .NET / C# code | `engineering-agent-dotnet` |
|
|
97
97
|
| ❌ Flutter/Dart mobile client code | `engineering-agent-flutter` |
|
|
98
|
+
| ❌ React Native mobile app (device APIs, Metro, Gradle/R8, AAB, local notifications, background limits) | `engineering-agent-react-native` |
|
|
98
99
|
| ❌ Python/Django/DRF backend code | `engineering-agent-django` |
|
|
99
100
|
| ❌ Tech stack decisions أو اختيار framework | Tera + Technology Profile |
|
|
100
101
|
|
|
@@ -5,6 +5,7 @@ description: >-
|
|
|
5
5
|
engineering core and project rules; routes .NET/C# work to the .NET specialist,
|
|
6
6
|
TypeScript/Node.js/React functional code to the TypeScript specialist,
|
|
7
7
|
Flutter/Dart mobile client work to the Flutter specialist,
|
|
8
|
+
React Native mobile app work to the React Native specialist,
|
|
8
9
|
Python/Django/DRF backend work to the Django specialist,
|
|
9
10
|
and Phaser 3 game engine work to the Phaser specialist.
|
|
10
11
|
mode: subagent
|
|
@@ -39,6 +40,7 @@ You are not a substitute for a specialist. Route to the correct specialist:
|
|
|
39
40
|
| **TypeScript functional code** (Node.js backend, React logic/stores/API, shared types) | `engineering-agent-typescript` — do not begin implementation |
|
|
40
41
|
| **Phaser 3 game engine** (scenes, sprites, tilemaps, physics, game loop) | `engineering-agent-phaser` — do not begin implementation |
|
|
41
42
|
| **Flutter/Dart mobile client** (features, state, Drift, offline-first, builds) | `engineering-agent-flutter` — do not begin implementation |
|
|
43
|
+
| **React Native mobile app** (features, state, SQLite/outbox, sync engine, notifications, RTL, Android AAB) | `engineering-agent-react-native` — do not begin implementation |
|
|
42
44
|
| **Python/Django/DRF backend** (models, serializers, viewsets, permissions, pytest) | `engineering-agent-django` — do not begin implementation |
|
|
43
45
|
|
|
44
46
|
If another specialist exists for the active stack, Tera must use that specialist instead. When no specialist matches, you (the general fallback) may implement the task.
|
|
@@ -72,7 +72,7 @@ Majed
|
|
|
72
72
|
|
|
73
73
|
> **ملاحظة:** هذه الرسمة تعكس العملاء الموجودين فعلياً في `.opencode/agents/`. أي عميل جديد يُضاف يجب أن تنعكس صورته هنا.
|
|
74
74
|
>
|
|
75
|
-
> **الأهم:** طبقة التنفيذ (Execution Layer)
|
|
75
|
+
> **الأهم:** طبقة التنفيذ (Execution Layer) 9: `engineering-agent`, `engineering-agent-dotnet`, `engineering-agent-typescript`, `engineering-agent-phaser`, `engineering-agent-flutter`, `engineering-agent-react-native`, `engineering-agent-django`, `ui-designer`, `tera-software-designer`. **8 منهم يكتبون كود التطبيق** (المهنّدسون السبعة + `ui-designer`) و**1 مواصفة تقنية بلا كود** (`tera-software-designer`). لا أحصر التفكير في Engineering Agent فقط.
|
|
76
76
|
|
|
77
77
|
### رسالتك
|
|
78
78
|
|
|
@@ -213,10 +213,10 @@ Its role is to detect, analyze, propose, govern, and narrowly execute approved s
|
|
|
213
213
|
رفض أو تقليل أي إضافة غير مبررة: ملفات، عملاء، طبقات، MCPs، أو قواعد مكررة.
|
|
214
214
|
|
|
215
215
|
7. **Core Agent Governance**
|
|
216
|
-
مراجعة وتحسين تعريفات جميع العملاء في `.opencode/agents/` — البالغ عددهم **
|
|
216
|
+
مراجعة وتحسين تعريفات جميع العملاء في `.opencode/agents/` — البالغ عددهم **27 حالياً** — للتأكد من أنها تعكس الواقع التشغيلي بدقة، ولا تحتوي تكراراً أو تضارباً.
|
|
217
217
|
|
|
218
218
|
**قائمة العملاء الكاملة (مصدر الحقيقة: `.opencode/agents/`):**
|
|
219
|
-
- **Execution Layer (طبقة التنفيذ —
|
|
219
|
+
- **Execution Layer (طبقة التنفيذ — 8 كود: المهنّدسون السبعة + `ui-designer` · 1 مواصفة: `tera-software-designer`):** `engineering-agent`, `engineering-agent-dotnet`, `engineering-agent-typescript`, `engineering-agent-phaser`, `engineering-agent-flutter`, `engineering-agent-react-native`, `engineering-agent-django`, `ui-designer`, `tera-software-designer`
|
|
220
220
|
- **Quality Agents:** `auditor`, `qa-agent`, `design-reviewer`
|
|
221
221
|
- **Management:** `tera` (TeraAgent), `monitor`
|
|
222
222
|
- **Engagement:** `tera-client-engagement`, `tera-business-transformation-consultant`, `application-blueprint`, `tera-strategic-advisor`
|
package/agents/tera.md
CHANGED
|
@@ -22,7 +22,7 @@ Before any action, you MUST read and pass:
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
## 🔴 CODE BOUNDARY (Hard Rule — الأهم)
|
|
25
|
+
## 🔴 CODE BOUNDARY (Hard Rule — الأهم) — مرجع سريع؛ النص الحاكم للتفعيل في `tera-system/AGENT_ACTIVATION_MATRIX.md`
|
|
26
26
|
|
|
27
27
|
أنت **مدير تنفيذ هندسي**. ممنوع من كتابة أي كود برمجي — ولا حتى سطر واحد.
|
|
28
28
|
|
|
@@ -40,6 +40,7 @@ Before any action, you MUST read and pass:
|
|
|
40
40
|
- **.NET / C#** (Blazor, WPF, EF Core, ASP.NET) → `engineering-agent-dotnet.md`
|
|
41
41
|
- **Phaser 3 game engine** (scenes, sprites, tilemaps, physics, game loop) → `engineering-agent-phaser.md`
|
|
42
42
|
- **Flutter/Dart mobile client** (features, state, Drift, offline-first, builds) → `engineering-agent-flutter.md`
|
|
43
|
+
- **React Native mobile app** (features, state, SQLite/outbox, sync engine, notifications, RTL, Android AAB) → `engineering-agent-react-native.md`
|
|
43
44
|
- **Python/Django/DRF backend** (models, serializers, viewsets, permissions, pytest) → `engineering-agent-django.md`
|
|
44
45
|
2. If no specialist matches the active stack, delegate to **EngineeringAgent** (`engineering-agent.md`) as general fallback.
|
|
45
46
|
3. Delegate to **UI Designer** (`ui-designer.md`) for:
|
|
@@ -231,6 +232,10 @@ Use the smallest sufficient structure. Before creating any file/task/agent, ask:
|
|
|
231
232
|
4. Can it be postponed safely?
|
|
232
233
|
5. Is there a simpler path?
|
|
233
234
|
|
|
235
|
+
**Rule Budget (SCP-2026-10-30-004):** كل SCP يضيف قاعدة ⇒ يُدمج/يُحذف سطر مكافئ، أو يُسجَّل **تبرير صريح لاستثناء السلامة** — لا نمو صافي بلا سبب.
|
|
236
|
+
|
|
237
|
+
**Rule-of-Two (SCP-2026-10-30-004):** لا تُقنَّن قاعدة لسيناريو لم يتكرر **مرتين** موثقتين؛ المرة الأولى تُسجَّل كملاحظة لا كقاعدة.
|
|
238
|
+
|
|
234
239
|
---
|
|
235
240
|
|
|
236
241
|
## 11. Phase Discipline
|
|
@@ -473,6 +478,7 @@ Never accept based on sub-agent report alone. Review actual files, CLI effects,
|
|
|
473
478
|
4. **الإغلاق قرار صريح:** عند الانتهاء قرّر وأغلق: `Accepted/Closed` أو `Escalated` أو `Needs Fix` مع سبب. **لا إبقاء مهمة مفتوحة «تحت التحسين» بلا قرار، ولا عمل إضافي بلا مبرر مسجّل.**
|
|
474
479
|
5. **نظافة السجلات:** حدّث `PROJECT_ACTIVITY_LOG`/ملف المهمة **دفعةً عند نقاط القرار** (بداية/نهاية جولة/قرار/إغلاق) — لا عند كل خطوة صغيرة.
|
|
475
480
|
6. **إبلاغ الإغلاق:** ثلاثة أسطر: ما سُلِّم · ما بقي (Follow-up) · سبب التوقف.
|
|
481
|
+
7. **لا تُخفّض بوابات المرحلة:** قاعدة الإيقاف سقف جولات **داخل المهمة** — لا تُستخدم لتجاوز أو تخفيف بوابات Phase 7 (Security Gate · Operational Readiness) أو أي بوابة إلزامية.
|
|
476
482
|
|
|
477
483
|
### Secret Redaction
|
|
478
484
|
Never write real secrets in any file. Use `[REDACTED]`.
|
|
@@ -499,6 +505,10 @@ Decisive STOP (SCP-2026-09-16-002): two possible readings and one is irreversibl
|
|
|
499
505
|
|
|
500
506
|
Task Prioritization: Fix P0 blockers first. Prefer dependencies, risk reduction, and smaller safer tasks.
|
|
501
507
|
|
|
508
|
+
### Parallel Window Guard (SCP-2026-10-30-004)
|
|
509
|
+
|
|
510
|
+
قبل أي كتابة/commit: `git fetch` → قارن `HEAD` بـ`origin/<default-branch>` → `git status --short`. ملفات أو commits **لا تملكها** = نافذة Tera أخرى ⇒ نسّق قبل الكتابة · تقاطع ⇒ **STOP** (لا جلب/دمج/استبدال فوق عمل غيرك). تحكم **Tera نفسها** — حوكمة الجلسات (`TERA_RUNTIME_TEMPLATES §2`) للفرعيين فقط.
|
|
511
|
+
|
|
502
512
|
---
|
|
503
513
|
|
|
504
514
|
## 15. Token and Context Rules
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: تهيئة مهندس React Native ذاتياً قبل أول عمل في الجلسة
|
|
3
|
+
agent: engineering-agent-react-native
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
طبّق `tera-system/runtime/AGENT_SELF_ORIENTATION_PROTOCOL.md` بالكامل على نفسك.
|
|
7
|
+
|
|
8
|
+
ملفك التشغيلي: `.opencode/agents/engineering-agent-react-native.md`. ركّز إضافياً على: عقدك المشترك في `tera-system/engineering-helpers/engineering-agent-core.md`، بروفايلك النشط `tera-system/profiles/react-native-mobile.md`، وملكيتك لطبقة **تطبيق الهاتف فقط** (لا خادم، لا ويب، لا تصميم بصري، لا وحدات أصلية، لا iOS بلا macOS).
|
|
9
|
+
|
|
10
|
+
حدودك الحرجة: التوكنات في SecureStore فقط · outbox دائم في SQLite · سحب ثم دفع بقفل واحد · `rev/base_rev` لا طوابع زمنية · tombstones · idempotency · قواعد R8 تُبقي أصناف الإشعارات · لا تدّعي تنفيذاً مضموناً في الخلفية ولا توقيتاً دقيقاً.
|
|
11
|
+
|
|
12
|
+
لا تبدأ أي تنفيذ قبل إكمال الدراسة وإعلان الجاهزية لـ Tera (Readiness Declaration).
|
|
@@ -1,146 +1,146 @@
|
|
|
1
|
-
# TASK-[ID]: [Task Title]
|
|
2
|
-
|
|
3
|
-
## 1. Task Information
|
|
4
|
-
|
|
5
|
-
| Field | Value |
|
|
6
|
-
|---|---|
|
|
7
|
-
| **TASK-ID** | TASK- |
|
|
8
|
-
| **Task Type** | Preparation / Coding / Review / Control |
|
|
9
|
-
| **Phase** | |
|
|
10
|
-
| **Build Mode Approved** | Yes / No / N/A (preparation tasks) |
|
|
11
|
-
| **Status** | Draft |
|
|
12
|
-
| **Assigned To** | |
|
|
13
|
-
| **Created** | YYYY-MM-DD |
|
|
14
|
-
| **Linked Plan Item** | PROJECT_DETAILED_EXECUTION_PLAN item / N/A |
|
|
15
|
-
| **Linked Batch** | EXECUTION_BATCH_PLAN batch / N/A |
|
|
16
|
-
| **Active Technology Profile** | Profile name / N/A |
|
|
17
|
-
| **Design Source Decision** | INTERNAL_TERA_KIT / GETDESIGN_MD / FIGMA_DESIGN_FILE / USER_PROVIDED_REFERENCE / EXTERNAL_URL_ANALYSIS / HYBRID / NO_UI / N/A |
|
|
18
|
-
| **UI Acceptance Gate Required** | Yes / No / N/A |
|
|
19
|
-
|
|
20
|
-
## 2. Objective
|
|
21
|
-
|
|
22
|
-
_What is the goal of this task?_
|
|
23
|
-
|
|
24
|
-
## 3. Reference Files
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
## 4. Allowed Write Targets
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
## 5. Forbidden Files / Actions
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
## 6. Acceptance Criteria
|
|
38
|
-
|
|
39
|
-
1.
|
|
40
|
-
2.
|
|
41
|
-
3.
|
|
42
|
-
|
|
43
|
-
## 6.1 Execution Gates
|
|
44
|
-
|
|
45
|
-
| Gate | Result | Notes |
|
|
46
|
-
|---|---|---|
|
|
47
|
-
| Orchestration Decision Matrix | _Direct / Helper Agent / Multi-Agent / Blocked_ | |
|
|
48
|
-
| Model Capability Gate | _Current model sufficient / Safeguards / Stronger recommended / Stronger required_ | |
|
|
49
|
-
| Pre-Execution Gate | _PASS / NEEDS_REVISION / BLOCKED_ | |
|
|
50
|
-
|
|
51
|
-
## 6.2 CLI / Tool Side Effects
|
|
52
|
-
|
|
53
|
-
| Command / Tool | Allowed? | Expected Side Effects | Approval Needed? |
|
|
54
|
-
|---|---|---|---|
|
|
55
|
-
| | _Yes / No / N/A_ | | _Yes / No_ |
|
|
56
|
-
|
|
57
|
-
## 6.3 UI / Frontend Requirements
|
|
58
|
-
|
|
59
|
-
Required for any UI, Frontend, layout, style, or component task.
|
|
60
|
-
|
|
61
|
-
| Item | Value |
|
|
62
|
-
|---|---|
|
|
63
|
-
| UI Source | `28_UI_UX_GUIDELINES.md` / DESIGN.md reference / FIGMA_DESIGN_FILE / Internal Kit / No UI |
|
|
64
|
-
| UI Rules | Tokens / Layout / Component Rules / RTL-LTR / Accessibility |
|
|
65
|
-
| UI Acceptance | `tera-system/design-system/UI_ACCEPTANCE_GATE.md` required? Yes / No |
|
|
66
|
-
| Design Gap Handling | Raise Design Gap / Ask Tera / N/A |
|
|
67
|
-
|
|
68
|
-
## 7. TASK-ID Size Check
|
|
69
|
-
|
|
70
|
-
```md
|
|
71
|
-
Requested Work:
|
|
72
|
-
Can it fit one TASK-ID? Yes/No
|
|
73
|
-
Reason:
|
|
74
|
-
Proposed Split:
|
|
75
|
-
- TASK-XXXX:
|
|
76
|
-
- TASK-XXXX:
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## 8. Sub-Agent Output Review
|
|
80
|
-
|
|
81
|
-
| Item | Result |
|
|
82
|
-
|---|---|
|
|
83
|
-
| Output is actionable | _Yes / No_ |
|
|
84
|
-
| Files reviewed or modified are listed | _Yes / No_ |
|
|
85
|
-
| Completed work is explicit | _Yes / No_ |
|
|
86
|
-
| Constraints or risks are stated | _Yes / No / N/A_ |
|
|
87
|
-
| Maps to acceptance criteria | _Yes / No_ |
|
|
88
|
-
| Stayed within TASK-ID scope | _Yes / No_ |
|
|
89
|
-
| Acceptance Decision | _Accept / Reject / Needs Fix_ |
|
|
90
|
-
| Rejection Reasons | |
|
|
91
|
-
|
|
92
|
-
## 9. Execution Report / Agent Handback
|
|
93
|
-
|
|
94
|
-
```text
|
|
95
|
-
Task ID:
|
|
96
|
-
Agent:
|
|
97
|
-
Status: Done / Blocked / Needs Clarification / Rework Needed
|
|
98
|
-
Files Created:
|
|
99
|
-
Files Modified:
|
|
100
|
-
Commands Run:
|
|
101
|
-
Summary:
|
|
102
|
-
Assumptions:
|
|
103
|
-
Issues or Missing Information:
|
|
104
|
-
Decisions Needed from Tera:
|
|
105
|
-
Recommendation:
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## 10. Tera Review
|
|
109
|
-
|
|
110
|
-
> Use `TERA_RUNTIME_TEMPLATES.md` Section 32 as the official Post-Execution Review template.
|
|
111
|
-
|
|
112
|
-
| Check | Result | Notes |
|
|
113
|
-
|---|---|---|
|
|
114
|
-
| TASK objective completed? | PASS / FAIL | |
|
|
115
|
-
| Output matches approved scope? | PASS / FAIL | |
|
|
116
|
-
| No files outside Allowed Write Targets? | PASS / FAIL | |
|
|
117
|
-
| No forbidden files created? | PASS / FAIL | |
|
|
118
|
-
| No extra libraries added? | PASS / FAIL | |
|
|
119
|
-
| No secrets or real `.env`? | PASS / FAIL | |
|
|
120
|
-
| Technology Profile respected? | PASS / FAIL | |
|
|
121
|
-
| UI/UX rules respected if UI exists? | PASS / FAIL / N/A | |
|
|
122
|
-
| UI Acceptance Gate passed if UI exists? | PASS / FAIL / N/A | |
|
|
123
|
-
| Acceptance Criteria passed? | PASS / FAIL | |
|
|
124
|
-
| Rollback needed? | Yes / No | |
|
|
125
|
-
|
|
126
|
-
## 11. Notes
|
|
127
|
-
|
|
128
|
-
## 12. Post-Execution Review Result
|
|
129
|
-
|
|
130
|
-
| Item | Status |
|
|
131
|
-
|---|---|
|
|
132
|
-
| Gate Result | _PASS / NEEDS_FIX / BLOCKED_ |
|
|
133
|
-
| Reviewer | |
|
|
134
|
-
| Review Date | |
|
|
135
|
-
| Notes | |
|
|
136
|
-
|
|
137
|
-
## 13. Final Tera Decision
|
|
138
|
-
|
|
139
|
-
| Item | Value |
|
|
140
|
-
|---|---|
|
|
141
|
-
| Final Status | Accepted / Needs Fix / Blocked / Rework Needed / Deferred / Cancelled |
|
|
142
|
-
| Registry Updated | Yes / No |
|
|
143
|
-
| Activity Log Updated | Yes / No |
|
|
144
|
-
| Project State Updated | Yes / No / N/A |
|
|
145
|
-
| Issues/Gaps Updated | Yes / No / N/A |
|
|
146
|
-
| Next Action | |
|
|
1
|
+
# TASK-[ID]: [Task Title]
|
|
2
|
+
|
|
3
|
+
## 1. Task Information
|
|
4
|
+
|
|
5
|
+
| Field | Value |
|
|
6
|
+
|---|---|
|
|
7
|
+
| **TASK-ID** | TASK- |
|
|
8
|
+
| **Task Type** | Preparation / Coding / Review / Control |
|
|
9
|
+
| **Phase** | |
|
|
10
|
+
| **Build Mode Approved** | Yes / No / N/A (preparation tasks) |
|
|
11
|
+
| **Status** | Draft |
|
|
12
|
+
| **Assigned To** | |
|
|
13
|
+
| **Created** | YYYY-MM-DD |
|
|
14
|
+
| **Linked Plan Item** | PROJECT_DETAILED_EXECUTION_PLAN item / N/A |
|
|
15
|
+
| **Linked Batch** | EXECUTION_BATCH_PLAN batch / N/A |
|
|
16
|
+
| **Active Technology Profile** | Profile name / N/A |
|
|
17
|
+
| **Design Source Decision** | INTERNAL_TERA_KIT / GETDESIGN_MD / FIGMA_DESIGN_FILE / USER_PROVIDED_REFERENCE / EXTERNAL_URL_ANALYSIS / HYBRID / NO_UI / N/A |
|
|
18
|
+
| **UI Acceptance Gate Required** | Yes / No / N/A |
|
|
19
|
+
|
|
20
|
+
## 2. Objective
|
|
21
|
+
|
|
22
|
+
_What is the goal of this task?_
|
|
23
|
+
|
|
24
|
+
## 3. Reference Files
|
|
25
|
+
|
|
26
|
+
-
|
|
27
|
+
-
|
|
28
|
+
|
|
29
|
+
## 4. Allowed Write Targets
|
|
30
|
+
|
|
31
|
+
-
|
|
32
|
+
|
|
33
|
+
## 5. Forbidden Files / Actions
|
|
34
|
+
|
|
35
|
+
-
|
|
36
|
+
|
|
37
|
+
## 6. Acceptance Criteria
|
|
38
|
+
|
|
39
|
+
1.
|
|
40
|
+
2.
|
|
41
|
+
3.
|
|
42
|
+
|
|
43
|
+
## 6.1 Execution Gates
|
|
44
|
+
|
|
45
|
+
| Gate | Result | Notes |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| Orchestration Decision Matrix | _Direct / Helper Agent / Multi-Agent / Blocked_ | |
|
|
48
|
+
| Model Capability Gate | _Current model sufficient / Safeguards / Stronger recommended / Stronger required_ | |
|
|
49
|
+
| Pre-Execution Gate | _PASS / NEEDS_REVISION / BLOCKED_ | |
|
|
50
|
+
|
|
51
|
+
## 6.2 CLI / Tool Side Effects
|
|
52
|
+
|
|
53
|
+
| Command / Tool | Allowed? | Expected Side Effects | Approval Needed? |
|
|
54
|
+
|---|---|---|---|
|
|
55
|
+
| | _Yes / No / N/A_ | | _Yes / No_ |
|
|
56
|
+
|
|
57
|
+
## 6.3 UI / Frontend Requirements
|
|
58
|
+
|
|
59
|
+
Required for any UI, Frontend, layout, style, or component task.
|
|
60
|
+
|
|
61
|
+
| Item | Value |
|
|
62
|
+
|---|---|
|
|
63
|
+
| UI Source | `28_UI_UX_GUIDELINES.md` / DESIGN.md reference / FIGMA_DESIGN_FILE / Internal Kit / No UI |
|
|
64
|
+
| UI Rules | Tokens / Layout / Component Rules / RTL-LTR / Accessibility |
|
|
65
|
+
| UI Acceptance | `tera-system/design-system/UI_ACCEPTANCE_GATE.md` required? Yes / No |
|
|
66
|
+
| Design Gap Handling | Raise Design Gap / Ask Tera / N/A |
|
|
67
|
+
|
|
68
|
+
## 7. TASK-ID Size Check
|
|
69
|
+
|
|
70
|
+
```md
|
|
71
|
+
Requested Work:
|
|
72
|
+
Can it fit one TASK-ID? Yes/No
|
|
73
|
+
Reason:
|
|
74
|
+
Proposed Split:
|
|
75
|
+
- TASK-XXXX:
|
|
76
|
+
- TASK-XXXX:
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 8. Sub-Agent Output Review
|
|
80
|
+
|
|
81
|
+
| Item | Result |
|
|
82
|
+
|---|---|
|
|
83
|
+
| Output is actionable | _Yes / No_ |
|
|
84
|
+
| Files reviewed or modified are listed | _Yes / No_ |
|
|
85
|
+
| Completed work is explicit | _Yes / No_ |
|
|
86
|
+
| Constraints or risks are stated | _Yes / No / N/A_ |
|
|
87
|
+
| Maps to acceptance criteria | _Yes / No_ |
|
|
88
|
+
| Stayed within TASK-ID scope | _Yes / No_ |
|
|
89
|
+
| Acceptance Decision | _Accept / Reject / Needs Fix_ |
|
|
90
|
+
| Rejection Reasons | |
|
|
91
|
+
|
|
92
|
+
## 9. Execution Report / Agent Handback
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
Task ID:
|
|
96
|
+
Agent:
|
|
97
|
+
Status: Done / Blocked / Needs Clarification / Rework Needed
|
|
98
|
+
Files Created:
|
|
99
|
+
Files Modified:
|
|
100
|
+
Commands Run:
|
|
101
|
+
Summary:
|
|
102
|
+
Assumptions:
|
|
103
|
+
Issues or Missing Information:
|
|
104
|
+
Decisions Needed from Tera:
|
|
105
|
+
Recommendation:
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## 10. Tera Review
|
|
109
|
+
|
|
110
|
+
> Use `TERA_RUNTIME_TEMPLATES.md` Section 32 as the official Post-Execution Review template.
|
|
111
|
+
|
|
112
|
+
| Check | Result | Notes |
|
|
113
|
+
|---|---|---|
|
|
114
|
+
| TASK objective completed? | PASS / FAIL | |
|
|
115
|
+
| Output matches approved scope? | PASS / FAIL | |
|
|
116
|
+
| No files outside Allowed Write Targets? | PASS / FAIL | |
|
|
117
|
+
| No forbidden files created? | PASS / FAIL | |
|
|
118
|
+
| No extra libraries added? | PASS / FAIL | |
|
|
119
|
+
| No secrets or real `.env`? | PASS / FAIL | |
|
|
120
|
+
| Technology Profile respected? | PASS / FAIL | |
|
|
121
|
+
| UI/UX rules respected if UI exists? | PASS / FAIL / N/A | |
|
|
122
|
+
| UI Acceptance Gate passed if UI exists? | PASS / FAIL / N/A | |
|
|
123
|
+
| Acceptance Criteria passed? | PASS / FAIL | |
|
|
124
|
+
| Rollback needed? | Yes / No | |
|
|
125
|
+
|
|
126
|
+
## 11. Notes
|
|
127
|
+
|
|
128
|
+
## 12. Post-Execution Review Result
|
|
129
|
+
|
|
130
|
+
| Item | Status |
|
|
131
|
+
|---|---|
|
|
132
|
+
| Gate Result | _PASS / NEEDS_FIX / BLOCKED_ |
|
|
133
|
+
| Reviewer | |
|
|
134
|
+
| Review Date | |
|
|
135
|
+
| Notes | |
|
|
136
|
+
|
|
137
|
+
## 13. Final Tera Decision
|
|
138
|
+
|
|
139
|
+
| Item | Value |
|
|
140
|
+
|---|---|
|
|
141
|
+
| Final Status | Accepted / Needs Fix / Blocked / Rework Needed / Deferred / Cancelled |
|
|
142
|
+
| Registry Updated | Yes / No |
|
|
143
|
+
| Activity Log Updated | Yes / No |
|
|
144
|
+
| Project State Updated | Yes / No / N/A |
|
|
145
|
+
| Issues/Gaps Updated | Yes / No / N/A |
|
|
146
|
+
| Next Action | |
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
استثناء محدود: `Monitor` يستطيع استدعاء `Auditor` فقط عندما يطلب Majed من Monitor مراجعة/تحدي عمل Tera بجودة مستقلة.
|
|
19
19
|
|
|
20
|
-
> **المرجع المعياري (SCP-2026-09-04-001 — مُحدَّث SCP-2026-09-23-006 وSCP-2026-10-03-002):** العملاء الرسميون هم **
|
|
20
|
+
> **المرجع المعياري (SCP-2026-09-04-001 — مُحدَّث SCP-2026-09-23-006 وSCP-2026-10-03-002 وSCP-2026-10-30-001):** العملاء الرسميون هم **27 عميلاً** بالأسماء الحديثة في `.opencode/agents/` (راجع `TeraSubAgents.md` §5). الأسماء القديمة (RequirementsScopeAgent, BusinessWorkflowAgent, DataDesignAgent, SolutionArchitectureAgent, UIUXStructureAgent, UIVisualDesignerAgent, QAAndAcceptanceAgent, EngineeringAgentTypeScript...) استُبدلت بأسمائها الفعلية أو انتقلت إلى **Preparation Roles** (أدوار تحضيرية يملكها application-blueprint).
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
## 2. مصفوفة التفعيل حسب العميل
|
|
43
43
|
|
|
44
|
-
### 2.1 العملاء الأساسيون (الـ
|
|
44
|
+
### 2.1 العملاء الأساسيون (الـ 27 الرسميون)
|
|
45
45
|
|
|
46
46
|
| العميل | المعرف | Trigger التفعيل | المرحلة | متى لا يُفعّل | الحد الأدنى من المدخلات |
|
|
47
47
|
|---|---|---|---|---|---|
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
| engineering-agent-dotnet | `ENGINEERING_AGENT_DOTNET` | `PHASE_GATE`: مهمة .NET/C# مع `Pre-Execution Gate: PASS` | 6 | لا لمهام TypeScript/Phaser | ملفات معتمدة + `TASK-ID` + `Pre-Execution Gate: PASS` + Active .NET Profile |
|
|
54
54
|
| engineering-agent-flutter | `ENGINEERING_AGENT_FLUTTER` | `PHASE_GATE`: مهمة Flutter/Dart mobile client مع `Pre-Execution Gate: PASS` | 6 | لا لمهام Backend (django). لا لتصميم بصري (ui-designer) | ملفات معتمدة + `TASK-ID` + `Pre-Execution Gate: PASS` + Active `flutter-mobile` Profile |
|
|
55
55
|
| engineering-agent-django | `ENGINEERING_AGENT_DJANGO` | `PHASE_GATE`: مهمة Python/Django/DRF backend مع `Pre-Execution Gate: PASS` | 6 | لا لمهام Flutter (flutter). لا صلاحيات مالية بلا بوابة أمنية | ملفات معتمدة + `TASK-ID` + `Pre-Execution Gate: PASS` + Active `python-django` Profile |
|
|
56
|
+
| engineering-agent-react-native | `ENGINEERING_AGENT_RN` | `PHASE_GATE`: مهمة React Native mobile app مع `Pre-Execution Gate: PASS` | 6 | لا لمهام الخادم/الويب (typescript). لا لتصميم بصري (ui-designer). لا لوحدات أصلية | ملفات معتمدة + `TASK-ID` + `Pre-Execution Gate: PASS` + Active `react-native-mobile` Profile |
|
|
56
57
|
| ui-designer | `UI_VISUAL_DESIGNER_AGENT` | `COMPLEXITY_SIGNAL`: وجود Frontend مهم أو مصدر تصميم (Figma, getdesign.md, screenshots) | 4–5 | API-only أو UI بسيط بدون متطلبات بصرية | `07_SCREENS_AND_UI_STRUCTURE.md` + مصدر التصميم |
|
|
57
58
|
| tera-software-designer | `SOFTWARE_DESIGNER_AGENT` | `IMPACT_SIGNAL`: أي محفّز أثر (DB/migration · auth/permissions/security · API عام · cross-module · مالي · مخزون · protocol/crypto · تغيير توافق · state machine معقّد · حدود معمارية) → **`SDA_REQUIRED` إلزامي** — **Impact يتجاوز Complexity**. `FAST_PATH` فقط بشروط الأمان الكاملة + سبب مكتوب | 5–6 | `NOT_APPLICABLE` (وثائقي/تشغيلي بحت) أو `FAST_PATH` مستوفٍ | `ENGINEERING_HANDOFF_PACKAGE.md` + ملف الـDraft Task + الملفات التحضيرية **المُطبَّقة على المهمة** (لا قائمة ثابتة) |
|
|
58
59
|
| qa-agent | `QA_ACCEPTANCE_AGENT` | **Planning:** `PHASE_GATE` + `DOCUMENT_READY`. **Execution:** `DOCUMENT_READY` بعد تنفيذ `TASK-COD-*` يحتاج تحقق فعلي. **كلا الوضعين:** قبل Phase 7 | 5–6–7 | مهمة بسيطة واضحة / لا تحتاج اختبار CLI | `10_TESTING_AND_ACCEPTANCE.md` أو ملف `TASK-COD-*` المنفذ + معايير القبول |
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
| **engineering-agent-phaser.md** 🆕 | `tera.md` | `engineering-agent-typescript.md` (يملك bridge معه عبر Tera) | `engineering-agent-core.md`, Active Technology Profile, game design documents |
|
|
22
22
|
| **engineering-agent-dotnet.md** | `tera.md` | — | `engineering-agent-core.md`, Active .NET Technology Profile |
|
|
23
23
|
| **engineering-agent-flutter.md** 🆕 | `tera.md` | `ui-designer.md` (ينفذ من 28_UI_UX_GUIDELINES.md)، `engineering-agent-django.md` (يستهلك API contracts عبر Tera) | `engineering-agent-core.md`, Active `flutter-mobile` Profile, `project-preparation/28_UI_UX_GUIDELINES.md` عند وجود واجهات |
|
|
24
|
-
| **engineering-agent-django.md** 🆕 | `tera.md` | `engineering-agent-flutter.md` (يسلّم له API contracts عبر Tera) | `engineering-agent-core.md`, Active `python-django` Profile |
|
|
24
|
+
| **engineering-agent-django.md** 🆕 | `tera.md` | `engineering-agent-flutter.md` (يسلّم له API contracts عبر Tera) | `engineering-agent-core.md`, Active `python-django` Profile |
|
|
25
|
+
| **engineering-agent-react-native.md** 🆕 (SCP-2026-10-30-001) | `tera.md` | `engineering-agent-typescript.md` (يسلّم له API contracts/idempotency/`rev` عبر Tera)، `ui-designer.md` (ينفذ من `28_UI_UX_GUIDELINES.md`) | `engineering-agent-core.md`, Active `react-native-mobile` Profile, `project-preparation/28_UI_UX_GUIDELINES.md` عند وجود واجهات |
|
|
25
26
|
| **tera-software-designer.md** | `tera.md` | `engineering-agent.md` (ينفذ الـ Spec) | `project-preparation/*.md`, `28_UI_UX_GUIDELINES.md`, `PROJECT_RULES.md` |
|
|
26
27
|
| **design-reviewer.md** | — (مستقل — يستدعيه Majed) | `TeraAgent`, `EngineeringAgent` (مراجعة مخرجاتهم) | `28_UI_UX_GUIDELINES.md`, `tera-system/design-system/DESIGN_REVIEW_STANDARDS.md` |
|
|
27
28
|
| **tera-client-engagement.md** | — (مستقل — يستدعيه Majed) | `domain-research-agent.md`, `domain-expert-agent.md`, `production-erp-expert.md`, `application-blueprint.md` | `tera-system/client-helpers/*.md`, `tera-system/TeraPricingPolicy.md` |
|
|
@@ -252,6 +252,7 @@
|
|
|
252
252
|
| security-observer (العين) | `SECURITY_OBSERVER` | `READ_ONLY` | إلى `WRITE_DOCS` عند تقرير المراقب في security-reports/observer | يراقب فقط — لا يهاجم، لا يصلح، لا يحكم (SCP-2026-09-02-001) |
|
|
253
253
|
| security-auditor (القاضي) | `SECURITY_AUDITOR` | `READ_ONLY` | إلى `WRITE_DOCS` عند تقرير التدقيق + قرار البوابة في security-reports/audit | يدقق فقط — لا يهاجم، لا يصلح، لا يثق بلا دليل (SCP-2026-09-02-001) |
|
|
254
254
|
| security-agent (الدرع) | `SECURITY_AGENT` | `READ_ONLY` | إلى `WRITE_DOCS` عند توثيق findings + `defense-handoff.md` و`fix-review.md` في security-reports | مراجعة دفاعية أثناء التطوير + مراجعة الإصلاحات — لا يهاجم، لا يكتب كوداً، لا يصدر قرار البوابة (SCP-2026-10-03-002) |
|
|
255
|
+
| engineering-agent-react-native | `ENGINEERING_AGENT_RN` | `WRITE_CODE` | — | كود تطبيق React Native (New Architecture) — عميل الهاتف فقط (SCP-2026-10-30-001) |
|
|
255
256
|
|
|
256
257
|
### 3.2 العملاء المشروطون (Helper Agents + Preparation Roles)
|
|
257
258
|
|
|
@@ -28,7 +28,7 @@ including:
|
|
|
28
28
|
- `design-reviewer.md`
|
|
29
29
|
- `tera-software-designer.md`
|
|
30
30
|
|
|
31
|
-
**نطاق فعلي (SCP-2026-10-03-007):** القائمة أعلاه **توضيحية لا حصرية** — **جميع** ملفات `.opencode/agents/` (حالياً **
|
|
31
|
+
**نطاق فعلي (SCP-2026-10-03-007):** القائمة أعلاه **توضيحية لا حصرية** — **جميع** ملفات `.opencode/agents/` (حالياً **27** عميلاً) تمرّ عبر Conduct Gate، وقاعدة «المحتوى غير الموثوق» (§3 #7) تسري عليها كلها.
|
|
32
32
|
|
|
33
33
|
## 3. Immutable Rules
|
|
34
34
|
|
|
@@ -64,8 +64,8 @@ Release Package (ملفات Tera-managed + SHA256SUMS + TERA_RELEASE_MANIFEST.js
|
|
|
64
64
|
|
|
65
65
|
| الحزمة | الاسم (npm) | الإصدار الحالي | الوصف | الملفات الموزعة ضمن الحزمة |
|
|
66
66
|
|---|---|---|---|---|
|
|
67
|
-
| core | `@tera-system/core` | 0.7.
|
|
68
|
-
| pro | `@tera-system/pro` | 0.2.
|
|
67
|
+
| core | `@tera-system/core` | 0.7.2 | OpenCode Plugin — core governance (27 agents, 40 commands, 13 profiles, distribution tools, security team) | `agents/`, `commands/`, `core/`, `assets/`, `tools/`, `scripts/` |
|
|
68
|
+
| pro | `@tera-system/pro` | 0.2.33 | Commercial edition — signed bundle + license gate + heartbeat | `scripts/`, `core/project-control`, `MANIFEST.json`, `opencode.tera.example.json`, `WELCOME.md`, `README.md` |
|
|
69
69
|
|
|
70
70
|
**مستودع الحزم:** `https://github.com/Alabasi1980/Teranoo-System` — حزمتا npm + الـ bundle الموقّع (بناء ونشر فقط؛ لا محتوى يدوي).
|
|
71
71
|
**المستودع الرسمي (`RepositoryUrl`):** `https://github.com/Alabasi1980/Teranoo-System-Core` — المصدر الوحيد المعتمد لـ `tera-fetch.ps1` و `tera-schedule.ps1` و `tera-update.ps1` (D1 — SCP-2026-09-23-002)
|
|
@@ -315,8 +315,10 @@ pwsh .\tools\update-client-repositories.ps1 -Version tera-v2.5.0 -Channel stable
|
|
|
315
315
|
| *(npm)* core `0.6.0` / pro `0.2.29` | 2026-09-26 | stable | تقوية الحوكمة/التشغيل + بروتوكولات جديدة (SCP-2026-09-24-001..006) [Verified: npm view + bundle v0.2.29] |
|
|
316
316
|
| *(npm)* core `0.6.2` / pro `0.2.30` | 2026-10-03 | stable | إصلاح release-blocker (trailing whitespace) — يتجاوز `0.6.1` المكسور (SCP-2026-10-03-001) [Verified: npm view] |
|
|
317
317
|
| *(npm)* core `0.7.0` / pro `0.2.31` | 2026-10-03 | stable | تفعيل الدرع `security-agent` كعميل مستقل — 26 agents / 39 commands (SCP-2026-10-03-002) [Verified: npm view] |
|
|
318
|
+
| *(npm)* core `0.7.1` / pro `0.2.32` | 2026-10-25 | stable | Delivery Stop Rule + تحصين حوكمة — 26 agents / 39 commands / 12 profiles (SCP-2026-10-03-003/005/006/007 · GAP-027)؛ Tag `tera-v0.7.1` = `2670f45` [Verified: npm view + bundle v0.2.32] |
|
|
319
|
+
| *(npm)* core `0.7.2` / pro `0.2.33` | 2026-10-30 | stable | متخصص React Native — `engineering-agent-react-native` + `react-native-mobile` + `tera-orient-rn`؛ 27 agents / 40 commands / 13 profiles (SCP-2026-10-30-001 · GAP-028)؛ Tag `tera-v0.7.2` = `00eaa33`؛ bundle `0.2.33` = 253 ملفاً · `contentSha256=20f92dc5…` [Verified: npm view + teranoo.com bundle] |
|
|
318
320
|
|
|
319
|
-
> **الحالة الحالية (2026-
|
|
321
|
+
> **الحالة الحالية (2026-10-31):** آخر إصدار منشور = `@tera-system/core 0.7.2` + `@tera-system/pro 0.2.33` [Verified: `npm view`]؛ الـbundle المخدوم على `teranoo.com` = 0.2.33 (253 ملفاً) [Verified]؛ آخر Git Tag على المستودع الرسمي = `tera-v0.7.2` → `00eaa33` [Verified: `git ls-remote`].
|
|
320
322
|
|
|
321
323
|
---
|
|
322
324
|
|
|
@@ -276,10 +276,10 @@ but the generic sub-agent registry in `TeraSubAgents.md` must remain stack-neutr
|
|
|
276
276
|
|
|
277
277
|
---
|
|
278
278
|
|
|
279
|
-
# 5. العملاء الأساسيون — السجل الرسمي (
|
|
279
|
+
# 5. العملاء الأساسيون — السجل الرسمي (27 عميلاً)
|
|
280
280
|
|
|
281
|
-
> **مصدر الحقيقة:** `.opencode/agents/` — **
|
|
282
|
-
> **التصنيف الرسمي:**
|
|
281
|
+
> **مصدر الحقيقة:** `.opencode/agents/` — **27 ملفاً نشطاً** بالأسماء الحديثة (القائمة الفعلية أوثق من أي عدّاد). هذا القسم **سجل مرجعي موجز**؛ التفاصيل التشغيلية الكاملة لكل عميل في ملفه الخاص.
|
|
282
|
+
> **التصنيف الرسمي:** 9 Coding + 3 Quality + 2 Management + 4 Engagement + 2 Research + 1 Knowledge + 1 Specialist + 1 System + 4 Security = **27 عميلاً**.
|
|
283
283
|
|
|
284
284
|
---
|
|
285
285
|
|
|
@@ -287,7 +287,7 @@ but the generic sub-agent registry in `TeraSubAgents.md` must remain stack-neutr
|
|
|
287
287
|
|
|
288
288
|
| الفئة | العدد | العملاء |
|
|
289
289
|
|:------|:-----:|:--------|
|
|
290
|
-
| **Execution Layer** — طبقة التنفيذ |
|
|
290
|
+
| **Execution Layer** — طبقة التنفيذ | 9 | engineering-agent, engineering-agent-dotnet, engineering-agent-typescript, engineering-agent-phaser, engineering-agent-flutter, engineering-agent-react-native, engineering-agent-django, ui-designer, tera-software-designer |
|
|
291
291
|
| **Quality Agents** — جودة | 3 | auditor, qa-agent, design-reviewer |
|
|
292
292
|
| **Management** — إدارة | 2 | tera (TeraAgent), monitor |
|
|
293
293
|
| **Engagement** — عملاء خارجيون | 4 | tera-client-engagement, tera-business-transformation-consultant, application-blueprint, tera-strategic-advisor |
|
|
@@ -297,7 +297,7 @@ but the generic sub-agent registry in `TeraSubAgents.md` must remain stack-neutr
|
|
|
297
297
|
| **System** — منظومة | 1 | tera-system-evolution |
|
|
298
298
|
| **Security** — فريق الحماية | 4 | red-team-agent, security-observer, security-auditor, security-agent |
|
|
299
299
|
|
|
300
|
-
> **تفصيل «طبقة التنفيذ» (
|
|
300
|
+
> **تفصيل «طبقة التنفيذ» (9):** **8 كتابة كود** — المهنّدسون السبعة (`engineering-agent`, `-dotnet`, `-typescript`, `-phaser`, `-flutter`, `-react-native`, `-django`) + `ui-designer` (واجهة عرضية TSX/CSS) — و**1 مواصفة تقنية بلا كود** (`tera-software-designer`). التسمية السابقة «Coding Agents — يكتبون كوداً» كانت **غير دقيقة لـ1 من 9** (SCP-2026-09-29-011).
|
|
301
301
|
|
|
302
302
|
---
|
|
303
303
|
|
|
@@ -312,6 +312,7 @@ but the generic sub-agent registry in `TeraSubAgents.md` must remain stack-neutr
|
|
|
312
312
|
| `engineering-agent-typescript.md` | TypeScript/Node.js/React (وظيفي) | Coding |
|
|
313
313
|
| `engineering-agent-phaser.md` | Phaser 3 Web Games | Coding |
|
|
314
314
|
| `engineering-agent-flutter.md` | Flutter/Dart mobile client | Coding |
|
|
315
|
+
| `engineering-agent-react-native.md` | React Native mobile app (New Architecture) | Coding |
|
|
315
316
|
| `engineering-agent-django.md` | Python/Django/DRF backend | Coding |
|
|
316
317
|
| `ui-designer.md` | تصميم بصري UI/UX | Coding |
|
|
317
318
|
| `tera-software-designer.md` | تصميم تقني / Technical Specs (بلا كود) | Design |
|
|
@@ -366,7 +367,7 @@ but the generic sub-agent registry in `TeraSubAgents.md` must remain stack-neutr
|
|
|
366
367
|
|
|
367
368
|
| الملف | الوظيفة |
|
|
368
369
|
|:------|:--------|
|
|
369
|
-
| `.opencode/agents/*.md` | التعريفات التشغيلية الكاملة (
|
|
370
|
+
| `.opencode/agents/*.md` | التعريفات التشغيلية الكاملة (27 عميلاً) |
|
|
370
371
|
| `AGENT_DEPENDENCY_MAP.md` | التبعيات والترتيب الآمن للتعديل |
|
|
371
372
|
| `AGENT_ACTIVATION_MATRIX.md` | متى يُفعَّل كل عميل |
|
|
372
373
|
| `AGENT_PERMISSION_MODEL.md` | الصلاحيات الافتراضية لكل عميل |
|
|
@@ -78,6 +78,17 @@ node scripts/validate-governance.mjs
|
|
|
78
78
|
|
|
79
79
|
- النتيجة: PASS / FAIL (مع القائمة). لا إغلاق بتقرير "PASS" بلا تشغيل فعلي.
|
|
80
80
|
|
|
81
|
+
## 5.2 Self-Consistency Proof — بعد أي تعديل نظامي (SCP-2026-10-30-004)
|
|
82
|
+
|
|
83
|
+
المُدقّق يفحص **البنية**، لا **النصوص**. لذلك بعد كل تعديل نظامي أثبت الآتي يدوياً:
|
|
84
|
+
|
|
85
|
+
1. **عدّاد العملاء موحّد نصياً** عبر: `AGENT_ACTIVATION_MATRIX` §2.1 (العنوان + المرجع) · `TeraSubAgents` §5 · `TERA_AGENT_CONDUCT` (نطاق فعلي) · `README` · `TERA_ACTIVE_CONTEXT`. (فحص: `grep -E "[0-9]+ عميل"` ومقارنته بعدد ملفات `.opencode/agents/`)
|
|
86
|
+
2. **كل SCP مُشار إليه موجود** كملف في `project-control/archive/`.
|
|
87
|
+
3. **كل ملف مُشار إليه موجود** (فحص المسارات المذكورة في التعديل).
|
|
88
|
+
4. **لا قاعدة معرّفة في مكانين** — مصدر واحد + مؤشرات فقط (لا نص مكرر).
|
|
89
|
+
|
|
90
|
+
> **الحادثة المثبتة:** إضافة عميل React Native تركت ثلاثة مواضع تقول 26 ⇒ كُشف بالبند 1 (SCP-2026-10-30-003).
|
|
91
|
+
|
|
81
92
|
## 6. Validation Commands
|
|
82
93
|
|
|
83
94
|
Recommended checks:
|
|
@@ -52,6 +52,8 @@ If the stack is still unclear, do not activate a final profile yet.
|
|
|
52
52
|
| `rust` | Rust (cargo/rustc) — 2024 edition, Axum/Tauri/SQLx | ✅ **Available** | عام: CLI، خدمات عالية الأداء، Tauri، WebAssembly — لا متخصص، يعمل عبر engineering-agent (fallback)؛ **مُثبَّت** ببناء/اختبار فعلي (Pilot GEN-F05 — SCP-2026-09-29-017) |
|
|
53
53
|
| `bun-ts-monorepo-sqlite` | TypeScript + Bun 1.3.14 + Turbo monorepo + SQLite | **Draft — Needs Verification** | منتج مستقل (APP-TERA_CODE) فوق Baseline موروث — CLI/TUI + Web محلي (127.0.0.1) + Desktop Shell؛ الحقول غير المتحققة موسومة `[Needs Verification — Phase A]`؛ الترقية لـ Available بعد Baseline Comprehension + تجربة تحقق (SCP-2026-09-18-001) |
|
|
54
54
|
| `python-django` | Python 3.12+ + Django 5.x + DRF + PostgreSQL | Available | خلفية API (models/serializers/viewsets، SimpleJWT، server-side permissions) — (SCP-2026-09-23-006) |
|
|
55
|
+
| `react-native-mobile` | React Native (New Architecture) + TypeScript + SQLite/outbox + sync engine | Available | موبايل — تطبيق هاتف (features/state/SQLite/outbox/notifications/RTL/AAB) — (SCP-2026-10-30-001) |
|
|
56
|
+
| `node-ts-coolify-postgres` | TypeScript/Node.js + PostgreSQL + Coolify | Available | خدمات Node/TS على Coolify + PostgreSQL — (بروفايل قائم؛ صف الفهرس أُضيف في SCP-2026-10-30-001) |
|
|
55
57
|
|
|
56
58
|
> **دلالة الحالة (PROFILE-DN-F06):** `Available` = **قابل للاستخدام تقنياً** · `Approved` = اعتمده Majed · `Approved — Active` = **مفعّل لمشروع قائم**. **`Available` لا يعني Active للتنفيذ** — على Tera تثبيت الـActive Profile للمشروع في ملفه قبل أي مهمة.
|
|
57
59
|
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# React Native Mobile Technology Profile
|
|
2
|
+
|
|
3
|
+
## 1. Purpose
|
|
4
|
+
|
|
5
|
+
This profile provides React Native–specific execution rules for mobile application projects in the Tera system.
|
|
6
|
+
|
|
7
|
+
It is a **stack-specific Technology Profile** — loaded only when a project is classified as **Mobile** with **React Native** as the chosen framework.
|
|
8
|
+
|
|
9
|
+
## 2. Identity
|
|
10
|
+
|
|
11
|
+
| Field | Value |
|
|
12
|
+
|---|---|
|
|
13
|
+
| Profile ID | `react-native-mobile` |
|
|
14
|
+
| Stack | React Native (New Architecture) + TypeScript |
|
|
15
|
+
| Minimum Node | 20+ (LTS — سجّل الفعلي) |
|
|
16
|
+
| React Native baseline | أحدث **stable** وقت التنفيذ (سجّل الفعلي) |
|
|
17
|
+
| Status | Available |
|
|
18
|
+
| Actual SDK | تُسجَّل نسخ RN/React/Node والحزم في `PROJECT_RULES.md` (§13) — **إلزامي** |
|
|
19
|
+
| Owner | Tera Agent (decision engine) / `engineering-agent-react-native` (execution) |
|
|
20
|
+
|
|
21
|
+
> **قاعدة النسخ:** كل الأرقام أعلاه **مقترحات** لا تثبيت. النسخة الفعلية تُسجَّل لكل مشروع في `PROJECT_RULES.md` قبل أول مهمة.
|
|
22
|
+
|
|
23
|
+
## 3. When to Load This Profile
|
|
24
|
+
|
|
25
|
+
- Project classification = **Mobile**، والـstack = **React Native**
|
|
26
|
+
- `project-control/PROJECT_STATE.md` أو `project-preparation/08_TECHNICAL_ARCHITECTURE.md` يسجّل `Active Technology Profile: react-native-mobile`
|
|
27
|
+
|
|
28
|
+
| Trigger | Action |
|
|
29
|
+
|---|---|
|
|
30
|
+
| Mobile + React Native | تحميل البروفايل فوراً |
|
|
31
|
+
| Pre-Execution Gate يكتشف RN بلا بروفايل محمّل | **BLOCKED** — لا تنفيذ |
|
|
32
|
+
|
|
33
|
+
## 4. Project Structure
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
src/
|
|
37
|
+
app/ # navigation + providers
|
|
38
|
+
features/{name}/ # data / domain / presentation
|
|
39
|
+
core/ # theme, constants, network, storage, i18n, utils
|
|
40
|
+
shared/ # cross-feature atoms (لا منطق أعمال)
|
|
41
|
+
assets/
|
|
42
|
+
__tests__/ | e2e/
|
|
43
|
+
android/ ios/ # native config فقط (لا كود أصلي)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Rules
|
|
47
|
+
- Feature-first للمشاريع المتوسطة والكبيرة.
|
|
48
|
+
- `App.tsx`/`index.js` минимальный — الإعداد في `src/app/`.
|
|
49
|
+
- **لا مسار ثابت للجذر** — يُحدَّد من `ClientAppPath` في ملف المهمة.
|
|
50
|
+
|
|
51
|
+
## 5. Architecture Guidance
|
|
52
|
+
|
|
53
|
+
| Concern | الاختيار |
|
|
54
|
+
|---|---|
|
|
55
|
+
| **State Management** | **واحد فقط**: Zustand **أو** Redux Toolkit **أو** TanStack Query (للخادم) — يُحسم في `PROJECT_RULES.md`، لا يُخلط |
|
|
56
|
+
| Navigation | React Navigation |
|
|
57
|
+
| Local DB | `expo-sqlite` أو `op-sqlite` — **معاملات ذرّية** |
|
|
58
|
+
| Key/Value | `AsyncStorage` للإعدادات فقط (لا أسرار) |
|
|
59
|
+
| Secrets | `expo-secure-store` / Keychain |
|
|
60
|
+
| HTTP | عميل واحد (axios أو fetch wrapper) + interceptors + timeout/retry محدود |
|
|
61
|
+
| i18n | `i18next` + `react-i18next` + RTL |
|
|
62
|
+
| Tests | `jest` + `@testing-library/react-native` |
|
|
63
|
+
|
|
64
|
+
### Architecture Rules
|
|
65
|
+
- **لا** CQRS/Event Sourcing/microservices داخل تطبيق الهاتف.
|
|
66
|
+
- **لا** تحقّق مزدوج للحالة يعيش في مكانين؛ مصدر واحد لكل كيان.
|
|
67
|
+
- لا قرارات تصميم بصري من داخل الكود — Design Tokens تأتي من `28_UI_UX_GUIDELINES.md`.
|
|
68
|
+
|
|
69
|
+
## 6. Offline / Sync (الأهم)
|
|
70
|
+
|
|
71
|
+
| العنصر | القاعدة |
|
|
72
|
+
|---|---|
|
|
73
|
+
| **Outbox** | **دائم في SQLite** — لا في الذاكرة · يُكتب في **نفس معاملة** التعديل |
|
|
74
|
+
| **الحقول** | `id, entity, entityId, type, payload, status, retryCount, nextRetryAt` |
|
|
75
|
+
| **الحالات** | `pending → syncing → completed / failed → backoff → pending` |
|
|
76
|
+
| **الترتيب** | **سحب ثم دفع** · تسلسل ثابت · **قفل واحد** (mutex) |
|
|
77
|
+
| **التعارض** | `rev` (خادم) + `base_rev` (عميل) — **لا طوابع زمنية** · **لا استبدال صامت** |
|
|
78
|
+
| **الحذف** | `deleted_at` (tombstone) — لا إحياء من نسخة أقدم |
|
|
79
|
+
| **Idempotency** | معرّف عملية مع كل طلب — إعادة المحاولة لا تكرّر |
|
|
80
|
+
| **الشبكة** | نجاح طلب المزامنة هو الحقيقة — لا `NetInfo` |
|
|
81
|
+
| **سياسة التعارض** | قرار Tera/Majed — البروفايل ينفّذ فقط |
|
|
82
|
+
|
|
83
|
+
## 7. Permissions
|
|
84
|
+
|
|
85
|
+
| Permission | لِم؟ |
|
|
86
|
+
|---|---|
|
|
87
|
+
| Notifications (`POST_NOTIFICATIONS` Android 13+) | التذكيرات |
|
|
88
|
+
| `SCHEDULE_EXACT_ALARM` (Android 12+) | جدولة دقيقة — عند الحاجة فقط |
|
|
89
|
+
| Storage/Media | مرفقات |
|
|
90
|
+
| Camera | عند اعتماد الميزة |
|
|
91
|
+
| Location | عند اعتماد الميزة |
|
|
92
|
+
|
|
93
|
+
- اطلب وقت الحاجة، لا عند الإقلاع.
|
|
94
|
+
- عالج `grant / deny / permanently-denied` (توجيه للإعدادات).
|
|
95
|
+
- وثّق كل صلاحية في `15_SECURITY_AND_ACCESS_CONTROL.md` أو `PROJECT_RULES.md`.
|
|
96
|
+
- **لا صلاحية بلا اعتماد.**
|
|
97
|
+
|
|
98
|
+
## 8. Notifications & Background
|
|
99
|
+
|
|
100
|
+
- قناة إشعار إلزامية (Android 8+).
|
|
101
|
+
- `RECEIVE_BOOT_COMPLETED` لإعادة الجدولة بعد التشغيل.
|
|
102
|
+
- **ProGuard/R8 must keep**notification/alarm/worker classes — أضف القواعد صريحة:
|
|
103
|
+
```proguard
|
|
104
|
+
-keep class * extends android.app.NotificationReceiver { *; }
|
|
105
|
+
-keep class * extends androidx.work.Worker { *; }
|
|
106
|
+
-keep class * extends android.content.BroadcastReceiver { *; }
|
|
107
|
+
```
|
|
108
|
+
(عدّلها حسب مكتبة الإشعارات المستخدمة ثم **تحقق من AAB release**.)
|
|
109
|
+
- **التنفيذ في الخلفية غير مضمون** — لا تعتمد عليه للحرج.
|
|
110
|
+
- وثّق أثر توفير الطاقة لدى المصنّعين (Xiaomi/OnePlus/Samsung) وأفصح للمستخدم.
|
|
111
|
+
|
|
112
|
+
## 9. Secure Storage
|
|
113
|
+
|
|
114
|
+
| الاستخدام | الأداة |
|
|
115
|
+
|---|---|
|
|
116
|
+
| التوكنات | `expo-secure-store` / Keychain |
|
|
117
|
+
| المفاتيح الحسّاسة | نفسها |
|
|
118
|
+
| الإعدادات | `AsyncStorage` (بلا أسرار) |
|
|
119
|
+
|
|
120
|
+
- **ممنوع** توكن/سر في `AsyncStorage` أو السجلات أو الـhandback.
|
|
121
|
+
- عند تسجيل الخروج: امسح التوكن + حالة بيانات الاعتماد في outbox.
|
|
122
|
+
|
|
123
|
+
## 10. Testing
|
|
124
|
+
|
|
125
|
+
| النوع | الأداة | إلزامي؟ |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| Unit | `jest` | ✅ للـservices/الـstores |
|
|
128
|
+
| Component | `@testing-library/react-native` | ✅ للمكوّنات المعقّدة |
|
|
129
|
+
| Sync/Outbox | `jest` + DB مؤقتة | ✅ **إلزامي** |
|
|
130
|
+
| E2E | Detox/Maestro | حسب المشروع |
|
|
131
|
+
|
|
132
|
+
- **لا تُختبر المكتبات المولّدة.** · شغّل `jest` قبل التسليم.
|
|
133
|
+
|
|
134
|
+
## 11. Android Configuration & Release
|
|
135
|
+
|
|
136
|
+
| البند | الملف |
|
|
137
|
+
|---|---|
|
|
138
|
+
| `applicationId` / `versionCode` / `versionName` | `android/app/build.gradle` |
|
|
139
|
+
| minSdk / targetSdk | `build.gradle` (يُسجَّل في `PROJECT_RULES.md`) |
|
|
140
|
+
| Signing | keystore + `key.properties` (خارج المستودع) |
|
|
141
|
+
| R8/ProGuard | `android/app/proguard-rules.pro` — **قواعد الإشعارات إلزامية** |
|
|
142
|
+
| Permissions | `AndroidManifest.xml` |
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# Debug / Release
|
|
146
|
+
npx react-native run-android
|
|
147
|
+
cd android && ./gradlew bundleRelease
|
|
148
|
+
```
|
|
149
|
+
- توقيع ونشر Play: **AAB**.
|
|
150
|
+
- سجّل SHA/نسخة keystore ومكان التخزين الآمن — **لا تخزّن المفاتيح في المستودع**.
|
|
151
|
+
|
|
152
|
+
## 12. iOS Constraints
|
|
153
|
+
|
|
154
|
+
| القيد | ملاحظة |
|
|
155
|
+
|---|---|
|
|
156
|
+
| البناء يتطلب macOS + Xcode | غير متاح ⇒ `Blocked by Environment` |
|
|
157
|
+
| التوقيع يتطلب Apple Developer | لا توعّد بجاهزية iOS بلا ذلك |
|
|
158
|
+
| نجاح Android ≠ جاهزية iOS | يُسجَّل صراحةً |
|
|
159
|
+
|
|
160
|
+
## 13. Environment Verification & Version Recording
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
node --version
|
|
164
|
+
npx react-native --version # أو npx expo --version
|
|
165
|
+
npx tsc --version
|
|
166
|
+
npx jest --version
|
|
167
|
+
```
|
|
168
|
+
- سجّل: Node · RN · React · مكتبة الحالة · عميل HTTP · SQLite · مكتبة الإشعارات — **في `PROJECT_RULES.md`**.
|
|
169
|
+
- قبل الاعتماد: `npm outdated` وقيّم الحزم (وجود/صيانة/شعبية).
|
|
170
|
+
|
|
171
|
+
## 14. Dependency Governance
|
|
172
|
+
|
|
173
|
+
- حزم **مستقرة** فقط (لا beta/dev بلا اعتماد).
|
|
174
|
+
- **Package Existence Check** إلزامي (راجع `engineering-agent-core.md` §6) — لا تثبّت اسماً من الذاكرة.
|
|
175
|
+
- حزمة واحدة لكل غرض (HTTP واحد · حالة واحدة · إشعارات واحدة).
|
|
176
|
+
- أي حزمة تتطلب إعداداً أصلياً (Firebase/camera/maps) → **اعتماد Tera** وتوثيق.
|
|
177
|
+
|
|
178
|
+
## 15. Performance
|
|
179
|
+
|
|
180
|
+
| البند | القاعدة |
|
|
181
|
+
|---|---|
|
|
182
|
+
| القوائم | `FlatList`/`FlashList` + `keyExtractor` ثابت |
|
|
183
|
+
| الصور | تحجيم + cache (لا صور كاملة الحجم) |
|
|
184
|
+
| Re-renders | selectors ضيقة + `memo` عند الحاجة فقط |
|
|
185
|
+
| حجم الحزمة | تحقّق من AAB النهائي · لا أصول غير مستخدمة |
|
|
186
|
+
| الجلسة | لا تسريب مستمعين (cleanup في `useEffect`) |
|
|
187
|
+
|
|
188
|
+
## 16. Known Limits (Document These)
|
|
189
|
+
|
|
190
|
+
| الحد | ملاحظة |
|
|
191
|
+
|---|---|
|
|
192
|
+
| تنفيذ الخلفية | محدود على المنصتين — ليس ضماناً |
|
|
193
|
+
| التوقيت الدقيق للتنبيهات | قد يكون تقريبياً |
|
|
194
|
+
| الوحدات الأصلية | تتطلب Kotlin/Swift — خارج النطاق |
|
|
195
|
+
| iOS | يتطلب macOS |
|
|
196
|
+
| الأجهزة منخفضة المواصفات | تحقق قبل الادعاء |
|
|
197
|
+
|
|
198
|
+
## 17. Security (Reference)
|
|
199
|
+
|
|
200
|
+
- `project-preparation/15_SECURITY_AND_ACCESS_CONTROL.md` · `TeraPreExecutionGate.md`
|
|
201
|
+
- لا أسرار في الحزمة · لا `console.log` للتوكنات · TLS مُتحقَّق (لا تعطيل الشهادات) · قواعد R8 كما في §8.
|
|
202
|
+
|
|
203
|
+
## 18. QA / Acceptance (Reference)
|
|
204
|
+
|
|
205
|
+
- `project-preparation/10_TESTING_AND_ACCEPTANCE.md` · `tera-system/runtime/TERA_RUNTIME_CHECKLISTS.md` §Mobile · `design-system/UI_ACCEPTANCE_GATE.md`
|
|
206
|
+
- اختبر: offline/online · grant/deny/deny-permanently · شبكة ضعيفة · RTL/LTR · جهاز حقيقي للتذكيرات.
|
|
207
|
+
|
|
208
|
+
## 19. References
|
|
209
|
+
|
|
210
|
+
| الموضوع | المصدر |
|
|
211
|
+
|---|---|
|
|
212
|
+
| React Native docs | https://reactnative.dev |
|
|
213
|
+
| New Architecture | https://reactnative.dev/architecture/landing-page |
|
|
214
|
+
| React Navigation | https://reactnavigation.org |
|
|
215
|
+
| expo-sqlite / op-sqlite | https://docs.expo.dev/versions/latest/sdk/sqlite/ |
|
|
216
|
+
| Notifications | https://reactnative.dev/docs/pushnotificationios · https://notifee.app |
|
|
217
|
+
| Tera Design Governance | `tera-system/design-system/` |
|
|
218
|
+
|
|
219
|
+
## 20. Profile Version
|
|
220
|
+
|
|
221
|
+
- **Current Profile Version:** 1.0.0
|
|
222
|
+
- **Last Updated:** 2026-10-30
|
|
223
|
+
- **Maintainer:** TeraSystemEvolutionAgent (حارس)
|
|
224
|
+
- **Created:** SCP-2026-10-30-001 (طلب TCEA — مرجع D-141)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tera-system/core",
|
|
3
|
-
"version": "0.7.
|
|
4
|
-
"description": "Tera System OpenCode Plugin — governance core,
|
|
3
|
+
"version": "0.7.3",
|
|
4
|
+
"description": "Tera System OpenCode Plugin — governance core, 27 agents, 40 commands, distribution tools (personal edition)",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|