@tera-system/core 0.6.0 → 0.6.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 (37) hide show
  1. package/MANIFEST.json +6 -6
  2. package/RELEASES.md +16 -0
  3. package/agents/engineering-agent-dotnet.md +30 -4
  4. package/agents/engineering-agent-flutter.md +5 -5
  5. package/agents/engineering-agent-typescript.md +70 -38
  6. package/agents/engineering-agent.md +12 -72
  7. package/agents/security-observer.md +2 -2
  8. package/agents/tera-client-engagement.md +1 -1
  9. package/agents/tera-software-designer.md +88 -54
  10. package/agents/tera-system-evolution.md +5 -5
  11. package/agents/tera.md +36 -6
  12. package/agents/ui-designer.md +1 -1
  13. package/assets/structurizr-mcp/pyproject.toml +1 -1
  14. package/assets/structurizr-mcp/uv.lock +816 -770
  15. package/commands/tera-orient-software-designer.md +1 -1
  16. package/commands/tera-orient-tera.md +1 -1
  17. package/core/tera-system/AGENT_ACTIVATION_MATRIX.md +1 -1
  18. package/core/tera-system/AGENT_PERMISSION_MODEL.md +3 -3
  19. package/core/tera-system/TERA_DISTRIBUTION_POLICY.md +7 -4
  20. package/core/tera-system/TeraArchitectureMap.md +1 -1
  21. package/core/tera-system/TeraCapabilityMap.md +2 -2
  22. package/core/tera-system/TeraPolicyMap.md +1 -1
  23. package/core/tera-system/TeraPreExecutionGate.md +17 -4
  24. package/core/tera-system/TeraSubAgents.md +5 -3
  25. package/core/tera-system/design-system/DESIGN_REVIEW_STANDARDS.md +2 -0
  26. package/core/tera-system/engineering-helpers/engineering-agent-core.md +19 -13
  27. package/core/tera-system/profiles/PROFILES_INDEX.md +3 -1
  28. package/core/tera-system/profiles/dotnet-razorpages-adonet.md +44 -43
  29. package/core/tera-system/profiles/dotnet-wpf-sqlite.md +17 -17
  30. package/core/tera-system/profiles/flutter-mobile.md +2 -2
  31. package/core/tera-system/profiles/rust.md +7 -6
  32. package/core/tera-system/runtime/AGENT_SELF_ORIENTATION_PROTOCOL.md +1 -0
  33. package/core/tera-system/runtime/TERA_RUNTIME_PROTOCOLS_CORE.md +2 -0
  34. package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES.md +14 -0
  35. package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md +1 -0
  36. package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES_PREPARATION.md +1 -1
  37. package/package.json +1 -1
@@ -5,7 +5,7 @@ agent: tera-software-designer
5
5
 
6
6
  طبّق `tera-system/runtime/AGENT_SELF_ORIENTATION_PROTOCOL.md` بالكامل على نفسك.
7
7
 
8
- ملفك التشغيلي: `.opencode/agents/tera-software-designer.md`. ركّز إضافياً على: دورك في التصميم المعماري وإنتاج Stubs هيكلية، وعلاقتك بالمهام المؤثرة (impactive tasks)، وحدودك (لا تنفيذ كود كامل).
8
+ ملفك التشغيلي: `.opencode/agents/tera-software-designer.md`. ركّز إضافياً على: دورك في إعداد **المواصفة التقنية** (`TECHNICAL_SPECIFICATION.md`) للمهام ذات محفّز الأثر، وعلاقتك بالمهام المؤثرة (impactive tasks)، وحدودك (لا كود تنفيذي — pseudocode/interface signatures غير تنفيذية فقط داخل المواصفة عند الحاجة).
9
9
 
10
10
  اقرأ مصادرك المرجعية: `project-preparation/*.md` (مخططات الحل وقواعد التصميم التنفيذية مثل 28_UI_UX_GUIDELINES.md)، `project-control/PROJECT_RULES.md` إن وُجد (قواعد المشروع).
11
11
 
@@ -7,6 +7,6 @@ agent: tera
7
7
 
8
8
  ملفك التشغيلي: `.opencode/agents/tera.md`. ركّز إضافياً على: Orchestration Decision Matrix، بوابات Pre-Execution/Post-Execution، مالك التفعيل (Phases 1–4 لمُهندس / 5–7 لك)، وبروتوكول التفويض في `TERA_RUNTIME_PROTOCOLS_CORE.md` §4.
9
9
 
10
- اقرأ مصادرك المرجعية: `tera-system/runtime/TERA_RUNTIME_*.md` (البروتوكولات والقوائم والقوالب)، `project-control/` (حالة المشروع والسجلات الحاكمة)، و`tera-system/ENGINEERING_HANDOFF_PACKAGE.md` (حزمة التسليم).
10
+ اقرأ مصادرك المرجعية: `tera-system/runtime/TERA_RUNTIME_*.md` (البروتوكولات والقوائم والقوالب)، و`project-control/` (حالة المشروع والسجلات الحاكمة + `ENGINEERING_HANDOFF_PACKAGE.md` داخل **مشروع التطبيق النشط**).
11
11
 
12
12
  لا تبدأ أي تفويض أو عمل قبل إكمال الدراسة وإعلان الجاهزية للمالك (Readiness Declaration).
@@ -54,7 +54,7 @@
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
56
  | 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
- | tera-software-designer | `SOFTWARE_DESIGNER_AGENT` | `COMPLEXITY_SIGNAL`: مهمة متعددة العملاء، أو تتجاوز 3 ملفات، أو تحمل مخاطر، أو تحتاج Technical Specification | 5–6 | مهمة بسيطة يمكن لـ Tera تجهيز Technical Specification مباشرة | ملفات التحليل المعتمدة + `TECHNICAL_SPECIFICATION.md` |
57
+ | 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
58
  | 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-*` المنفذ + معايير القبول |
59
59
  | auditor | `AUDITOR` | `TASK_COMPLETED` + `RISK_SIGNAL` / `QUALITY_SIGNAL` / `REVIEW_NEEDED`؛ ويستدعيه Monitor فقط بطلب Majed؛ وفي Phases 1–4: `PHASE_GATE` — **مراجعة اتساق تحضير (كل دفعة)** بطلب مُهندس (SCP-2026-09-24-006) | 6 (و 1–4 لوضع Preparation-Review) | مهمة وثائقية صغيرة وقرار Tera `AUDITOR_REVIEW_NOT_REQUIRED` مع سبب | ملف المهمة + Handback + diff/changed files + QA/Security evidence؛ أو دفعة مستندات تحضير + upstream + template |
60
60
  | design-reviewer | `DESIGN_REVIEWER` | `PHASE_GATE`: بعد إنتاج TASK-PROTO-* الأول؛ و`REVIEW_NEEDED` للواجهات المنفذة | 5–6 | لا واجهات/بروتوتايب (API-only) أو `WAIVED_BY_MAJED` | `project-control/prototypes/` + مصدر التصميم + `07_SCREENS_AND_UI_STRUCTURE.md` |
@@ -115,7 +115,7 @@
115
115
  | تشغيل اختبارات | ❌ ممنوع |
116
116
  | إنشاء ملفات جديدة | ✅ ضمن `Allowed Write Targets` فقط |
117
117
 
118
- **متى يستخدم:** للعملاء الذين ينتجون توثيقًا أو تصميمًا أو تحضيرًا، مثل ui-designer (Design Tokens) وعملاء توثيق التسليم (عبر tera.md).
118
+ **متى يستخدم:** للعملاء الذين ينتجون **توثيقًا/تحضيرًا بلا كود** — مثل `application-blueprint` (ملفات التحضير) وعملاء توثيق التسليم (عبر tera.md). **لا يشمل `ui-designer`** (يكتب كود واجهة عرضية → `WRITE_CODE`) — SCP-2026-09-29-012.
119
119
 
120
120
  ---
121
121
 
@@ -185,7 +185,7 @@
185
185
  | تعديل project-control | ❌ ممنوع |
186
186
  | DEPLOY / النشر | ❌ ممنوع — النشر ملك `DevOpsDeploymentAgent` فقط (فصل المهام). لا يُرفع EngineeringAgent إلى `DEPLOY_WITH_APPROVAL` (SCP-2026-09-24-001) |
187
187
 
188
- **متى يستخدم:** لـ EngineeringAgent وأي عميل تنفيذي.
188
+ **متى يستخدم:** لـ EngineeringAgent وأي عميل تنفيذي **يكتب كوداً** — بما فيه `ui-designer` (نطاق محدود: مكوّنات عرضية/واجهة فقط — SCP-2026-09-29-012).
189
189
 
190
190
  ---
191
191
 
@@ -234,7 +234,7 @@
234
234
  | engineering-agent-dotnet | `ENGINEERING_AGENT_DOTNET` | `WRITE_CODE` | — | كود .NET/C# |
235
235
  | engineering-agent-flutter | `ENGINEERING_AGENT_FLUTTER` | `WRITE_CODE` | — | كود Flutter/Dart (عميل موبايل) — SCP-2026-09-23-006 |
236
236
  | engineering-agent-django | `ENGINEERING_AGENT_DJANGO` | `WRITE_CODE` | — | كود Python/Django/DRF (خادم) — SCP-2026-09-23-006 |
237
- | ui-designer | `UI_VISUAL_DESIGNER_AGENT` | `WRITE_DOCS` | إلى READ_ONLY إذا كان مراجعة فقط | يكتب Design Tokens / Component Rules / Layout Rules داخل `28_UI_UX_GUIDELINES.md` |
237
+ | ui-designer | `UI_VISUAL_DESIGNER_AGENT` | `WRITE_CODE` | إلى READ_ONLY إذا كان مراجعة فقط | **نطاق محدود:** مكوّنات عرضية/واجهة (TSX/CSS/Tailwind) + Design Tokens / UI Spec — **لا** منطق وظيفي (hooks/state/API) ولا backend. الاستثناء الوثائقي: ملف UI/UX Guidelines (`28_UI_UX_GUIDELINES.md`) ضمن Allowed Write Targets (SCP-2026-09-29-012) |
238
238
  | tera-software-designer | `SOFTWARE_DESIGNER_AGENT` | `WRITE_DOCS` | إلى `PLAN_ONLY` إذا ما زالت الخطة غير ناضجة | يجهز Technical Specification للمهام فقط |
239
239
  | qa-agent | `QA_ACCEPTANCE_AGENT` | `RUN_TESTS` | إلى READ_ONLY إذا كان مراجعة فقط | **Planning Mode:** `WRITE_DOCS` — خطط الاختبار ومعايير القبول. **Execution Mode:** `RUN_TESTS` + bash — تشغيل CLI + تقارير اختبار رسمية |
240
240
  | auditor | `AUDITOR` | `READ_ONLY` | إلى `WRITE_DOCS` عند كتابة تقرير التدقيق | تدقيق Diff-first بعد التنفيذ؛ لا يعدّل كوداً. + وضع `Preparation-Review` (قراءة فقط · تقرير) بطلب مُهندس — SCP-2026-09-24-006 |
@@ -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.4.0 | OpenCode Plugin — core governance (25 agents, 38 commands, distribution tools, security team) | `agents/`, `commands/`, `core/`, `assets/`, `tools/`, `scripts/` |
68
- | pro | `@tera-system/pro` | 0.2.26 | Commercial edition — signed bundle + license gate + heartbeat | `scripts/`, `core/project-control`, `MANIFEST.json`, `opencode.tera.example.json`, `WELCOME.md`, `README.md` |
67
+ | core | `@tera-system/core` | 0.6.0 | OpenCode Plugin — core governance (25 agents, 38 commands, distribution tools, security team) | `agents/`, `commands/`, `core/`, `assets/`, `tools/`, `scripts/` |
68
+ | pro | `@tera-system/pro` | 0.2.29 | 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)
@@ -309,9 +309,12 @@ pwsh .\tools\update-client-repositories.ps1 -Version tera-v2.5.0 -Channel stable
309
309
  |---|---|---|---|
310
310
  | `tera-v1.0.0` | 2026-08-15 | stable | أول إصدار رسمي موثق: آلية توزيع كاملة (release/fetch/update/batch)، تنظيف شامل، وإصلاحات Pilot (gitattributes، commit detection) |
311
311
  | `tera-v0.3.1` | 2026-09-18 | stable | Technology Profile `bun-ts-monorepo-sqlite` — Tag على مستودع المصدر `Teranoo-System-Core` (SCP-2026-09-18-001) [Verified] |
312
- | *(npm)* core `0.4.0` / pro `0.2.26` | 2026-09-21 | stable | أوامر التهيئة الذاتية + معالجة الفجوات (SCP-2026-09-21-001/002) [Verified: packages RELEASES + npm view] |
312
+ | *(npm)* core `0.4.0` / pro `0.2.26` | 2026-09-21 | stable | أوامر التهيئة الذاتية + معالجة الفجوات (SCP-2026-09-21-001/002) [Verified] |
313
+ | *(npm)* core `0.4.1` / pro `0.2.27` | 2026-09-23 | stable | مصالحة التوزيع + مزامنة الأصول + وسم `tera-v0.4.1` (SCP-2026-09-23-002/003) [Verified] |
314
+ | *(npm)* core `0.5.0` / pro `0.2.28` | 2026-09-24 | stable | وكيلا Flutter/Django + بروفايل `python-django` (SCP-2026-09-23-006) [Verified: packages RELEASES] |
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] |
313
316
 
314
- > **الحالة الحالية (2026-09-23):** آخر إصدار منشور على npm = `@tera-system/core 0.4.0` + `@tera-system/pro 0.2.26` [Verified: `npm view`]. آخر Git Tag = `tera-v0.3.1` على `Teranoo-System-Core`. تقليد الترقيم (رقم core مقابل رقم pro) قيد الحسم — SCP-2026-09-23-001.
317
+ > **الحالة الحالية (2026-09-29):** آخر إصدار منشور = `@tera-system/core 0.6.0` + `@tera-system/pro 0.2.29` [Verified: `npm view`]؛ الـbundle المخدوم على `teranoo.com` = 0.2.29 (248 ملفاً) [Verified]. **آخر Git Tag على المصدر = `tera-v0.4.1` — وسم `tera-v0.5.0`/`tera-v0.6.0` مفقود (قرار معلّق؛ يمسّ قناة `tera-fetch`/`tera-update`).**
315
318
 
316
319
  ---
317
320
 
@@ -26,7 +26,7 @@ It is a map, not a policy source. Rules remain in the files listed in `TeraPolic
26
26
  | Sub-agent lifecycle | Defines, generates, narrows, activates, and reviews specialized agents | `TeraSubAgents.md`, `AGENT_GENERATION_TEMPLATE.md`, `generated-agents/` |
27
27
  | Delivery, handoff, and closure | Produces final delivery readiness, release notes, client handover material, acceptance records, and closure reports | `project-control/DELIVERY_READINESS_REPORT.md`, `project-control/PROJECT_CLOSURE_REPORT.md`, `clients/.../delivery/` |
28
28
  | Project implementation knowledge | Maintains concise current-state operational knowledge per screen/module/service | `project-knowledge/` داخل كل تطبيق |
29
- | Tera distribution and versioning | Builds releases and distributes Tera to client repositories in a versioned, verifiable way; clients derive updates from the origin repository (`https://github.com/Alabasi1980/Teranoo-System-Core`) via fetch + verified release packages (Tag `tera-vX.Y.Z` + Manifest + SHA lockfile + updater tools); npm packages `@tera-system/core 0.4.0` + `@tera-system/pro 0.2.26`; website `https://github.com/Alabasi1980/TeraWebsite` hosts bundle at `https://teranoo.com` and is deployed via `https://coolify.teranoo.com/`; ownership contract separates Tera-managed from client-owned files | `tera-system/TERA_DISTRIBUTION_POLICY.md` (§2.2 الحزم + §2.3 الموقع + §2.0 الأصالة), `tera-workshop/tools/tera-fetch.ps1`, `tera-workshop/tools/tera-release.ps1`, `tera-workshop/tools/tera-update.ps1`, `.tera/lock.json` داخل مستودعات العملاء |
29
+ | Tera distribution and versioning | Builds releases and distributes Tera to client repositories in a versioned, verifiable way; clients derive updates from the origin repository (`https://github.com/Alabasi1980/Teranoo-System-Core`) via fetch + verified release packages (Tag `tera-vX.Y.Z` + Manifest + SHA lockfile + updater tools); npm packages `@tera-system/core 0.6.0` + `@tera-system/pro 0.2.29`; website `https://github.com/Alabasi1980/TeraWebsite` hosts bundle at `https://teranoo.com` and is deployed via `https://coolify.teranoo.com/`; ownership contract separates Tera-managed from client-owned files | `tera-system/TERA_DISTRIBUTION_POLICY.md` (§2.2 الحزم + §2.3 الموقع + §2.0 الأصالة), `tera-workshop/tools/tera-fetch.ps1`, `tera-workshop/tools/tera-release.ps1`, `tera-workshop/tools/tera-update.ps1`, `.tera/lock.json` داخل مستودعات العملاء |
30
30
  | Security Team (فريق الحماية) | Adversarial security validation before delivery: الدرع (defensive review during dev) → الشبح (Red Team — authorized attacks, Black Box then Gray/White Box) → العين (concurrent observer) → القاضي (independent audit + gate decision). Activated only at Phase 7 security gate or by Majed request. Outputs under `security-reports/` (same repo, outside the application folder). SCP-2026-09-02-001 | `.opencode/agents/red-team-agent.md`, `.opencode/agents/security-observer.md`, `.opencode/agents/security-auditor.md`, `tera-system/TeraHelperAgents.md` §6.1, `security-reports/`, adversarial protocol v2.0 (outside repo) |
31
31
 
32
32
  ## 3. Folder Roles
@@ -76,7 +76,7 @@
76
76
  | الفئة | اللغات | آلية التنفيذ |
77
77
  |---|---|---|
78
78
  | 🥇 **متخصصة (Specialist)** | C#/.NET، TypeScript/Node.js/React، Phaser 3 (JS)، **Flutter/Dart**، **Python/Django** | عميل متخصص مخصص بمعايير كاملة |
79
- | 🥈 **مغطاة ببروفايل** | Razor Pages+ADO.NET، Next.js+Prisma، WPF، Blazor+EF، React PWA، **Rust (Draft)** | Fallback + بروفايل (قواعد Scaffold/ORM/CLI موثقة) — Rust: بروفايل `rust.md` (Draft — Needs Verification، SCP-2026-09-04-011) |
79
+ | 🥈 **مغطاة ببروفايل** | Razor Pages+ADO.NET، Next.js+Prisma، WPF، Blazor+EF، React PWA، **Rust (Available)** | Fallback + بروفايل (قواعد Scaffold/ORM/CLI موثقة) — Rust: بروفايل `rust.md` (✅ Available — مُثبَّت Pilot GEN-F05 · SCP-2026-09-29-017) |
80
80
  | 🥉 **غير مغطاة (أي لغة أخرى)** | PHP/Laravel، Java/Spring، Go، Ruby، Kotlin، Swift... | **Fallback العام مباشرة** — يعمل بلا بروفايل (بجودة أقل) أو ببروفايل (بجودة موثقة) |
81
81
 
82
82
  ### 2.3 المعادلة الحاكمة
@@ -98,7 +98,7 @@
98
98
  | المستوى | اللغات | الموقف |
99
99
  |---|---|---|
100
100
  | **ذكاء عالي + أداة** | Python، TypeScript/JS، C#، Java، Go، PHP، C/C++ | ✅ تنفيذ موثوق بجودة عالية حتى بلا بروفايل |
101
- | **ذكاء متوسط + أداة** | Dart، Ruby، Kotlin، Swift (ببيئة Mac)، Rust (بروفايل Draft — SCP-2026-09-04-011) | ✅ يعمل — بروفايل يرفع الجودة |
101
+ | **ذكاء متوسط + أداة** | Dart، Ruby، Kotlin، Swift (ببيئة Mac)، Rust (بروفايل ✅ Available — SCP-2026-09-29-017) | ✅ يعمل — بروفايل يرفع الجودة |
102
102
  | **ذكاء محدود + أداة** | لغات نادرة/جديدة/إصدارات حديثة جداً | ⚠️ يعمل لكن بخطأ محتمل — بروفايل شبه إلزامي |
103
103
  | **أي مستوى بلا أداة** | أي لغة بلا CLI/بيئة بناء | 🔴 تتوقف عند "الكتابة" ولا تصل "التسليم" |
104
104
 
@@ -112,7 +112,7 @@ Project files record project-specific decisions.
112
112
  | Business Transformation Consultant (BTCA) | `.opencode/agents/tera-business-transformation-consultant.md` | `tera-system/consulting-helpers/BTCA_METHODOLOGY_FRAMEWORK.md`, `BTCA_REPORT_TEMPLATES.md` | عميل مستقل للاستشارات الإدارية والتنظيمية غير البرمجية — Track C. SCP-2026-07-29-002. |
113
113
  | BTCA — Methodology Framework | `tera-system/consulting-helpers/BTCA_METHODOLOGY_FRAMEWORK.md` | `.opencode/agents/tera-business-transformation-consultant.md` | إطار المنهجية: تصنيف الأدلة الخماسي، مراحل العمل، دليل المقابلات، هيكل التقرير النهائي. |
114
114
  | BTCA — Report Templates | `tera-system/consulting-helpers/BTCA_REPORT_TEMPLATES.md` | `.opencode/agents/tera-business-transformation-consultant.md` | قوالب التقارير العشرة الأساسية + التقرير التنفيذي. |
115
- | Tera distribution (versioned) | `tera-system/TERA_DISTRIBUTION_POLICY.md` (§2.2 الحزم + §2.3 الموقع + §2.0 الأصالة) | `.tera/lock.json` في مستودعات العملاء | توزيع Tera المُروّس: **RepositoryUrl `https://github.com/Alabasi1980/Teranoo-System-Core`** (المصدر؛ مستودع الحزم `Teranoo-System` = npm فقط) + الحزم `@tera-system/core 0.4.0` / `@tera-system/pro 0.2.26` (مقاس من npm المنشور 2026-09-23 — SCP-2026-09-23-001) + **الموقع `https://github.com/Alabasi1980/TeraWebsite` + `https://teranoo.com` + منصة النشر `https://coolify.teranoo.com/`** + إصدارات (Tag+SHA) + عقد ملكية + أدوات `tera-workshop/tools/`. أي تعديل على ملفات Tera-managed يتطلب Tag+bundle+npm publish. SCP-2026-08-15-009 + SCP-2026-08-31-002 + SCP-2026-08-31-003. |
115
+ | Tera distribution (versioned) | `tera-system/TERA_DISTRIBUTION_POLICY.md` (§2.2 الحزم + §2.3 الموقع + §2.0 الأصالة) | `.tera/lock.json` في مستودعات العملاء | توزيع Tera المُروّس: **RepositoryUrl `https://github.com/Alabasi1980/Teranoo-System-Core`** (المصدر؛ مستودع الحزم `Teranoo-System` = npm فقط) + الحزم `@tera-system/core 0.6.0` / `@tera-system/pro 0.2.29` (مقاس من npm المنشور 2026-09-29 — SCP-2026-09-23-001 + releases 024-00x) + **الموقع `https://github.com/Alabasi1980/TeraWebsite` + `https://teranoo.com` + منصة النشر `https://coolify.teranoo.com/`** + إصدارات (Tag+SHA) + عقد ملكية + أدوات `tera-workshop/tools/`. أي تعديل على ملفات Tera-managed يتطلب Tag+bundle+npm publish. SCP-2026-08-15-009 + SCP-2026-08-31-002 + SCP-2026-08-31-003. |
116
116
  | Source code ownership & pricing | `tera-system/TeraPricingPolicy.md` (§31) + `tera-system/TeraClientPolicy.md` (§9.5) | `tera-workshop/client-templates/contractual/SOURCE_CODE_PURCHASE_ADDENDUM_TEMPLATE.md`، `SOFTWARE_SERVICES_AGREEMENT` §12 | ملكية السورس افتراضياً لـ Tera (لا يُسلَّم للزبون) + خيارا L1 (40%) / L2 (max(3×، 1,000 JOD)) عبر ملحق تعاقدي + L3 (إعادة بيع) مرفوض افتراضياً. SCP-2026-08-29-004. |
117
117
  | Prototype pricing mandate | `tera-system/TeraPricingPolicy.md` (§17.5) + `tera-system/TeraClientPolicy.md` (Gate 6) | `tera-workshop/client-templates/commercial/QUOTATION_TEMPLATE.md`, `project-control/TeraPricingCalculator.xlsx` | البروتوتايب التصميمي إلزامي لكل التطبيقات (SCP-2026-08-28-001) وهو **بند مسعّر مشمول**: 10% من السعر النهائي (B57) — يُحتسب تلقائياً في الحاسبة — يُعرض كبند منفصل في العرض — يُلغى إلى 0% فقط باتفاق الطرفين (WAIVED_BY_MAJED + موافقة الزبون). رفض البروتوتايب المعروض لا يُلغي تكلفته (Fix/CR). SCP-2026-09-01-001. |
118
118
  | Client letter numbering | `tera-system/TeraClientPolicy.md` (§9.6) + `project-control/CLIENT_CODES.md` | `client-approval/LETTER_LOG.md` في مستودع العميل | ترميز موحد `{كود-العميل}-{النوع}-{السنة}-{التسلسل}` — كود العميل يخصّصه Majed فقط (سجل مركزي) — الأنواع LET/CON/ADD/PAL/DOC/TPL (قابلة للزيادة). SCP-2026-08-29-005. |
@@ -832,11 +832,24 @@ Required Action:
832
832
  Read project state → Identify next task → Prepare/draft task package → Check CLI side effects → Run checklist → Revise until PASS → Ask approval
833
833
  ```
834
834
 
835
- ### SoftwareDesignerAgent Preparation Rule
835
+ ### SoftwareDesignerAgent Gate Rule (SDA Classification — SCP-2026-09-29-010)
836
836
 
837
- Tera may use `SoftwareDesignerAgent` to prepare the technical specification before delegation.
838
- This agent produces `TECHNICAL_SPECIFICATION.md` covering scope, references, write targets, acceptance criteria, risk notes, and reviewer suggestions.
839
- Tera must still review that specification himself, run the full `Pre-Execution Gate`, and keep final authority over approval, delegation, and closure.
837
+ كل مهمة تنفيذية تُصنَّف **إلزامياً**: `SDA Classification: REQUIRED / FAST_PATH / NOT_APPLICABLE` (القاعدة: **Impact Trigger يتجاوز Complexity Trigger**). هذا فحص إلزامي داخل البوابة — لا "may use".
838
+
839
+ **`REQUIRED` → ترفض المهمة إن نقص أيٌّ من:**
840
+ ```text
841
+ [ ] TASK-COD-XXX موجود كـ Draft
842
+ [ ] TASK-COD-XXX_TECHNICAL_SPECIFICATION.md موجود
843
+ [ ] حالة المواصفة = APPROVED_FOR_GATE
844
+ [ ] لا Design Gap غير مُعالج
845
+ [ ] الحالات المرجعية المطبَّقة ≥ MBA
846
+ [ ] Tera راجع المواصفة
847
+ [ ] المواصفة مُشار إليها من عقد المهمة
848
+ ```
849
+ **`FAST_PATH` → ترفض إن نقص:** سبب مكتوب + إثبات تحقق كل شروط الـFast Path.
850
+ **`NOT_APPLICABLE` →** مهام وثائقية/تشغيلية فقط.
851
+
852
+ أي نقص → `NEEDS_REVISION` (لا تفويض). Tera يبقى صاحب السلطة النهائية على الاعتماد/التفويض/الإغلاق. المواصفة تغطي scope/references/write targets/acceptance criteria/risk notes/reviewers وفق قالب `tera-software-designer.md` §5.
840
853
 
841
854
  لا يعتمد على الذاكرة أو الاستنتاج العام. يعتمد على القائمة والفحص.
842
855
 
@@ -287,7 +287,7 @@ but the generic sub-agent registry in `TeraSubAgents.md` must remain stack-neutr
287
287
 
288
288
  | الفئة | العدد | العملاء |
289
289
  |:------|:-----:|:--------|
290
- | **Coding Agents** — يكتبون كوداً | 8 | engineering-agent, engineering-agent-dotnet, engineering-agent-typescript, engineering-agent-phaser, engineering-agent-flutter, engineering-agent-django, ui-designer, tera-software-designer |
290
+ | **Execution Layer** — طبقة التنفيذ | 8 | engineering-agent, engineering-agent-dotnet, engineering-agent-typescript, engineering-agent-phaser, engineering-agent-flutter, 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 |
@@ -295,7 +295,9 @@ but the generic sub-agent registry in `TeraSubAgents.md` must remain stack-neutr
295
295
  | **Knowledge** — معرفة | 1 | project-knowledge-agent |
296
296
  | **Specialist** — تخصص | 1 | production-erp-expert |
297
297
  | **System** — منظومة | 1 | tera-system-evolution |
298
- | **Security** — فريق الحماية | 3 | red-team-agent, security-observer, security-auditor |
298
+ | **Security** — فريق الحماية | 3 | red-team-agent, security-observer, security-auditor |
299
+
300
+ > **تفصيل «طبقة التنفيذ» (8):** **7 كتابة كود** — المهنّدسون الستة (`engineering-agent`, `-dotnet`, `-typescript`, `-phaser`, `-flutter`, `-django`) + `ui-designer` (واجهة عرضية TSX/CSS) — و**1 مواصفة تقنية بلا كود** (`tera-software-designer`). التسمية السابقة «Coding Agents — يكتبون كوداً» كانت **غير دقيقة لـ1 من 8** (SCP-2026-09-29-011).
299
301
 
300
302
  ---
301
303
 
@@ -312,7 +314,7 @@ but the generic sub-agent registry in `TeraSubAgents.md` must remain stack-neutr
312
314
  | `engineering-agent-flutter.md` | Flutter/Dart mobile client | Coding |
313
315
  | `engineering-agent-django.md` | Python/Django/DRF backend | Coding |
314
316
  | `ui-designer.md` | تصميم بصري UI/UX | Coding |
315
- | `tera-software-designer.md` | تصميم تقني / Technical Specs | Coding |
317
+ | `tera-software-designer.md` | تصميم تقني / Technical Specs (بلا كود) | Design |
316
318
  | `auditor.md` | تدقيق جودة Diff-first (مُدقق) | Quality |
317
319
  | `qa-agent.md` | اختبارات CLI (تخطيط + تنفيذ) | Quality |
318
320
  | `design-reviewer.md` | مراجعة بصرية (ناقد) | Quality |
@@ -102,6 +102,8 @@
102
102
  [ ] إذا كان المحتوى “مرئيًا” لكنه غير “مريحًا”: فشل
103
103
  ```
104
104
 
105
+ > **قاعدة cross-check الصور (SCP-2026-09-29-002):** بعد كل لقطة، أجرِ cross-check لحقيقة مميزة واحدة في DOM (`find`/`evaluate`) **قبل** الاستشهاد بالصورة — فطبقة إرفاق الصور قد تعيد صورة قديمة؛ لا تحكم على صورة وحدها. يُفضَّل element-screenshot + هدوء بين اللقطات.
106
+
105
107
  ## §4. نظافة التصميم (Design Hygiene)
106
108
 
107
109
  ```
@@ -10,17 +10,23 @@ It governs authority, task discipline, safe writing, evidence, and handback. It
10
10
 
11
11
  Every engineering agent must read this file before it starts a task.
12
12
 
13
- **🧰 أدواتك المتاحة:**
14
- - **🎭 Playwright** — لتوليد اختبارات E2E (CLI: `playwright-cli`، MCP: `@playwright/mcp`، Test: `@playwright/test`). استخدمه تلقائياً للمهام ذات واجهات المستخدم — افتح المتصفح، اختبر التدفق، التقط Screenshot.
15
- - **📮 Bruno** — توثيق واختبار APIs. استخدم `bru run` لاختبار Collections بعد إنشاء APIs جديدة. (مثبت: `@usebruno/cli`).
16
- - **📊 Sentry** — مراقبة الأخطاء بعد التشغيل. أضف Sentry SDK (`@sentry/...`) في مشاريع الإنتاج.
17
- - **🎨 shadcn/ui** — مكتبة المكونات المعتمدة للواجهات. استخدم `npx shadcn@latest add ...` لإضافة مكونات. استخدم Teranoo UI Registry (`tera-system/teranoo-ui/`) للمكونات المخصصة.
18
- - **🔑 Gitleaks** — فحص الأسرار في سجل Git قبل تسليم الكود: `gitleaks git . --redact --no-banner`. قم بتشغيله قبل إغلاق المهام الحساسة (Auth, Payment, Secrets, PII) وعند أي شك في وجود بيانات اعتماد.
19
- - **🎯 axe-core** — فحص Accessibility آلي داخل اختبارات Playwright: `@axe-core/playwright`. أي اختبار واجهة E2E للمهام الجديدة يتضمن فحص axe (labels, contrast, ARIA, semantics) وتُسجل أي violations.
20
- - **🧪 Testcontainers** — اختبارات تكاملية مع خدمات حقيقية (PostgreSQL, Redis, SQL Server) داخل Docker: `Testcontainers` (NuGet) أو `@testcontainers/*` (npm). استخدمه بدل Mocks فقط عندما تكون الخدمة الحقيقية متاحة عبر Docker.
21
- - **dotnet build/test/run** — لـ .NET
22
- - **npm/node** — لإدارة الحزم
23
- - **curl/webfetch** — لاختبار API
13
+ **🧰 أدوات التنفيذ — قاعدة محكومة (SCP-2026-09-29-013):**
14
+
15
+ هذه القاعدة **لا تفرض** أي مكتبة/إطار/أداة كافتراض. استخدم الأداة **المعتمدة من الـTechnology/Tooling Profile النشط + المهمة**. لا تفترض أداة "افتراضية".
16
+
17
+ | الحاجة | عند اعتمادها في الـProfile/المهمة |
18
+ |---|---|
19
+ | E2E / فحص واجهة | Playwright (`playwright-cli` / `@playwright/mcp` / `@playwright/test`) — افتح، اختبر، لقطات |
20
+ | Accessibility | axe-core (`@axe-core/playwright`) — إن كانت متاحة أو أذن الـProfile بإضافتها |
21
+ | API docs/tests | Bruno (`bru run`) — **فقط إن كان مسار الـCollection ضمن Allowed Write Targets** |
22
+ | Observability | **إن كان المعتمد = Sentry** → تحقّق من تهيئته؛ وإلا لا تُضِف |
23
+ | UI components | مكتبة المكوّنات **المعتمدة في الـProfile** (shadcn/ui أو غيرها) + Teranoo UI Registry عند اعتماده |
24
+ | Secrets scan | Gitleaks (`gitleaks git . --redact --no-banner`) — قبل مهام Auth/Payment/Secrets/PII |
25
+ | Integration tests | Testcontainers — عند الحاجة لخدمة حقيقية + Docker متاح + اعتماد الـProfile |
26
+ | Build/Run | dotnet / npm / node / curl — حسب الـstack |
27
+
28
+ > **إضافة Dependency:** لا تُضِف أي حزمة إلا إذا: (أ) موجودة أصلاً → استخدمها، أو (ب) المهمة/الـProfile يسمح صراحة بإضافتها. وإلا → **أبلغ Tera بنقص التغطية**، ولا تُضِف.
29
+ > **Tooling الكامل:** `tera-system/TOOLING_AND_MCP_POLICY.md`.
24
30
 
25
31
  ---
26
32
 
@@ -96,7 +102,7 @@ Never write outside Allowed Write Targets because a path “looks related.”
96
102
  - If the task includes a UI change:
97
103
  1. **PLAYWRIGHT_UI_CHECK**: Run the app locally, open browser via Playwright CLI or MCP, visually verify the UI, take a full-page screenshot as evidence.
98
104
  2. **E2E Test**: If the project has Node.js/npm available, generate a basic Playwright E2E test (`*.spec.ts`) covering the changed flow. The test must be runnable via `npx playwright test`.
99
- 3. **AXE_A11Y_CHECK** (new UI flows): If the project has `@axe-core/playwright` available or can add it, include an axe scan in the E2E test and record `violations` in the handback. Add `@axe-core/playwright` as a devDependency when creating new UI tests for interfaces with forms, navigation, or interactive controls.
105
+ 3. **AXE_A11Y_CHECK** (new UI flows): إن كان `@axe-core/playwright` متاحاً أو أذن الـProfile/المهمة بإضافته، ضمّن فحص axe في اختبار E2E وسجّل `violations` في الـhandback. **لا تُضِف الحزمة تلقائياً** — إن لم تكن متاحة ولم يُؤذن، أبلغ Tera بنقص تغطية a11y.
100
106
  - If the task adds or changes data-layer tests that need a real database/cache service and Docker is available, prefer **Testcontainers** over Mocks-only for the critical integration paths (see §6.1 below). If Docker is unavailable, state the limitation and use Mocks with a documented follow-up.
101
107
  - **GITLEAKS_PRE_DELIVERY_CHECK**: Before closing a task that touches Auth, Payment, Secrets, PII, or credential-like strings, run `gitleaks git . --redact --no-banner` and record the result in the handback. Never commit a real secret; if Gitleaks reports a real credential, stop and report to Tera.
102
108
 
@@ -228,7 +234,7 @@ If repeated real-work evidence reveals a gap in this core, a specialist contract
228
234
  ### 10.6 النظافة والحد الأدنى (Cleanliness & Minimalism)
229
235
 
230
236
  - **لا كود ميت**: لا تترك imports/دوال/متغيرات غير مستخدمة.
231
- - **لا تكرار واضح**: كرر مرتين = فكّر في الاستخراج؛ كرر ثلاثاً = استخرج (بمسؤولية ضيقة).
237
+ - **لا تكرار واضح**: كرر مرتين = فكّر في الاستخراج؛ كرر ثلاثاً = **مراجعة إلزامية للاستخراج** — قرار واعٍ بمسؤولية ضيقة، **وليس تجريداً تلقائياً** (قد يكون الاستخراج غير مناسب).
232
238
  - **لا ملفات خارج نطاق المهمة**: كل ملف تلمسه يجب أن يخدم هدف المهمة المصرح به.
233
239
  - نظّف أي حطام تنقله (ملفات تجريبية، سجلات مؤقتة، تعليقات قديمة) قبل الـ handback.
234
240
 
@@ -49,10 +49,12 @@ If the stack is still unclear, do not activate a final profile yet.
49
49
  | `react-pwa` | React 18 + Vite + TypeScript + Tailwind CSS (RTL) + Zustand + idb (IndexedDB) + Fuse.js + vite-plugin-pwa | ✅ **Approved — Active** | PWA محلي عربي (Offline Standalone) — فعّل Majed (2026-08-01, PREP-D-016) |
50
50
  | `flutter-mobile` | Flutter + Dart | Available | موبايل — يُحمَّل عند تصنيف المنتج موبايل (MVP_DEFINITION_PROTOCOL + MOBILE_UI_UX_STANDARDS) — (SCP-2026-09-04-003) |
51
51
  | `dotnet-razorpages-adonet` | .NET Razor Pages + ADO.NET | Available | تطبيقات أعمال داخلية + تكامل بيانات — (SCP-2026-09-04-003) |
52
- | `rust` | Rust (cargo/rustc) — 2024 edition, Axum/Tauri/SQLx | **Draft — Needs Verification** | عام: CLI، خدمات عالية الأداء، Tauri، WebAssembly — لا متخصص، يعمل عبر engineering-agent (fallback)؛ الترقية لـ Available بعد تجربة تحقق (SCP-2026-09-04-011) |
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
55
 
56
+ > **دلالة الحالة (PROFILE-DN-F06):** `Available` = **قابل للاستخدام تقنياً** · `Approved` = اعتمده Majed · `Approved — Active` = **مفعّل لمشروع قائم**. **`Available` لا يعني Active للتنفيذ** — على Tera تثبيت الـActive Profile للمشروع في ملفه قبل أي مهمة.
57
+
56
58
  ## Placeholder Candidates
57
59
 
58
60
  The following stacks may need profiles later, but are not created now:
@@ -3,45 +3,45 @@
3
3
  ## 1. Profile Identity
4
4
 
5
5
  - Profile ID: `dotnet-razorpages-adonet`
6
- - Language: C#
7
- - Framework: ASP.NET Core Razor Pages (.NET 8 LTS)
8
- - Database: SQL Server (destination) + Oracle (source, read-only via ODP.NET)
9
- - ORM: ADO.NET SqlBulkCopy (data loading), Entity Framework Core (config + logs only)
6
+ - Language: C# (.NET 8 LTS)
7
+ - Framework: ASP.NET Core Razor Pages (server-rendered)
8
+ - Database: SQL Server (destination) + an approved external read-only source (e.g., Oracle — per project)
9
+ - ORM: ADO.NET SqlBulkCopy (bulk data loading), Entity Framework Core (config + logs only)
10
10
  - Package Manager / CLI: dotnet CLI, NuGet
11
- - UI Library: Syncfusion (Blazor/Razor components via TagHelpers or JS interop)
11
+ - UI Library: the project's approved UI component library (per profile/design system)
12
12
  - Default Project Type: Internal business application with data integration
13
13
 
14
14
  ## 2. Applicability
15
15
 
16
16
  Use this profile when:
17
- - The approved architecture uses ASP.NET Core Razor Pages (not Blazor Server/WebAssembly)
18
- - The application needs to connect to Oracle as a data source (read-only)
19
- - Data is loaded into SQL Server via ADO.NET SqlBulkCopy for performance
17
+ - The approved architecture uses ASP.NET Core Razor Pages (server-rendered, not SPA)
18
+ - The application integrates data from an **approved external read-only source** (e.g., Oracle)
19
+ - Data is bulk-loaded into SQL Server via ADO.NET SqlBulkCopy for performance
20
20
  - EF Core is used only for application-level configuration and logging
21
- - The application is deployed on IIS (local or on-premise)
21
+ - The application is hosted on IIS (local or on-premise — as approved)
22
22
 
23
23
  This profile covers:
24
24
  - ASP.NET Core Razor Pages (server-rendered, not SPA)
25
- - Oracle.ManagedDataAccess (ODP.NET) for Oracle connectivity
26
- - ADO.NET SqlBulkCopy for high-performance data transfer
25
+ - An approved external source connector (e.g., Oracle.ManagedDataAccess / ODP.NET)
26
+ - ADO.NET SqlBulkCopy for high-performance bulk data transfer
27
27
  - EF Core for config/logs tables only
28
- - Syncfusion components for dashboard/report UI
28
+ - The project's approved UI component library for views/reports
29
29
  - IIS hosting model
30
30
 
31
31
  ## 3. Default Execution Order
32
32
 
33
- 1. Scaffold the .NET solution structure (API project + Razor Pages project).
34
- 2. Add only the required base packages (ODP.NET, EF Core, Syncfusion license key).
33
+ 1. Scaffold the .NET solution structure (service project + Razor Pages project).
34
+ 2. Add only the required base packages (source connector, EF Core, approved UI library). **أي ترخيص لمكتبة UI مرخّصة يُحمَّل من مصدر secret/config معتمد — لا يُثبَّت (hardcode)** (PROFILE-DN-F05).
35
35
  3. Create config/logs database schema (EF Core entities + migrations).
36
- 4. Build Oracle connection and data extraction layer (ODP.NET).
37
- 5. Build SQL Server data loading layer (SqlBulkCopy).
38
- 6. Build Sync Engine (full refresh + incremental-ready architecture).
39
- 7. Build Sync Logs and monitoring.
40
- 8. Build Dashboard layout and rendering (Razor Pages + Syncfusion).
41
- 9. Build Drill Down and navigation.
42
- 10. Build Admin Panel (Card CRUD + config).
43
- 11. Integrate Sync Status display in Dashboard.
44
- 12. IIS deployment configuration.
36
+ 4. Build the external-source connection and extraction layer.
37
+ 5. Build the SQL Server bulk-loading layer (SqlBulkCopy).
38
+ 6. Build the sync engine (full refresh + incremental-ready architecture).
39
+ 7. Build sync logs and monitoring.
40
+ 8. Build the main views and rendering (Razor Pages + approved UI library).
41
+ 9. Build drill-down and navigation.
42
+ 10. Build the configuration/admin area for the project's config entities.
43
+ 11. Integrate sync-status display in the views.
44
+ 12. Hosting / IIS deployment configuration.
45
45
 
46
46
  ## 4. First Task Rule
47
47
 
@@ -49,17 +49,18 @@ Safe first task:
49
49
 
50
50
  ```text
51
51
  Scaffold .NET 8 solution structure with two projects:
52
- WarehouseDashboard.Api (Console / Worker Service for sync engine)
53
- WarehouseDashboard.Web (ASP.NET Core Razor Pages)
54
- + Add base packages: Oracle.ManagedDataAccess.Core, Microsoft.Data.SqlClient,
55
- Microsoft.EntityFrameworkCore.SqlServer, Syncfusion.Blazor (for license)
52
+ {Solution}.Api (Console / Worker Service for the sync engine)
53
+ {Solution}.Web (ASP.NET Core Razor Pages)
54
+ + Add base packages: the approved source connector (e.g., Oracle.ManagedDataAccess.Core),
55
+ Microsoft.Data.SqlClient, Microsoft.EntityFrameworkCore.SqlServer,
56
+ and the approved UI component library
56
57
  + Verify solution builds cleanly
57
58
  ```
58
59
 
59
60
  **Do NOT** in the first task:
60
61
  - Add EF Core entities
61
62
  - Add migrations or database update
62
- - Add Oracle connection logic
63
+ - Add external-source connection logic
63
64
  - Add any business logic
64
65
  - Add any UI rendering
65
66
  - Add authentication/authorization
@@ -69,28 +70,28 @@ Scaffold .NET 8 solution structure with two projects:
69
70
  - Use `dotnet new razor` for the Web project, `dotnet new console` or `dotnet new webapi` for the API project.
70
71
  - Solution file should be at root with two project references.
71
72
  - Keep the first task limited to project structure and minimum approved packages.
72
- - Syncfusion license key is set via `Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense()` in `Program.cs`.
73
+ - مكتبة UI المرخّصة: `Program.cs` يجوز أن يستدعي واجهة تسجيل الترخيص (مثل `SyncfusionLicenseProvider.RegisterLicense(value)`) حيث `value` يُحمَّل من **مصدر secret/config معتمد**. **لا تُثبَّت القيمة في المصدر** (PROFILE-DN-F05).
73
74
  - IIS hosting: configure `appsettings.json` with `"Urls": "http://localhost:5000"` as default, configurable via IIS.
74
75
 
75
76
  ## 6. ORM / Database Rules
76
77
 
77
78
  **Entity Framework Core (Config + Logs only):**
78
- - Used exclusively for `WarehouseDashboardDbContext` with Config entities (CardConfig, DataSourceConfig, etc.) and Log entities (SyncLog, ErrorLog, etc.).
79
+ - Used exclusively for the project's DbContext with Config entities and Log entities.
79
80
  - `dotnet ef migrations add` belongs to a separate migration task.
80
81
  - `dotnet ef database update` is forbidden unless the task is explicitly a database apply task.
81
- - Do not use EF Core for Oracle data entities or bulk operations.
82
+ - Do not use EF Core for external-source data entities or bulk operations.
82
83
 
83
84
  **ADO.NET / SqlBulkCopy (Data Loading):**
84
- - Used for all Oracle-to-SQL Server data transfer.
85
+ - Used for all external-source → SQL Server data transfer.
85
86
  - SqlBulkCopy belongs to a dedicated data-loading task.
86
- - Oracle connection is via `Oracle.ManagedDataAccess.Client.OracleConnection`.
87
+ - External source connection is via the approved connector (e.g., `Oracle.ManagedDataAccess.Client.OracleConnection`).
87
88
  - Full Refresh = DELETE all rows + SqlBulkCopy.WriteToServer in single transaction.
88
89
  - Incremental Sync ready architecture = track LastSyncTimestamp, support Upsert pattern.
89
90
 
90
- **Oracle (Read-Only Source):**
91
- - ODP.NET connections are read-only by convention.
92
- - Oracle table details are deferred — client provides during execution.
93
- - Oracle Managed Data Access (NuGet: Oracle.ManagedDataAccess.Core).
91
+ **External Source (Read-Only):**
92
+ - Source connections are read-only by convention.
93
+ - Source table details are deferred — provided during execution per project.
94
+ - Connector package: the approved one (e.g., Oracle.ManagedDataAccess.Core).
94
95
 
95
96
  ## 7. CLI Side Effects
96
97
 
@@ -107,12 +108,12 @@ Do not add by default in the first implementation task:
107
108
 
108
109
  - EF Core entities or DbContext
109
110
  - Migrations or database update
110
- - Oracle connection logic
111
+ - External-source connection logic
111
112
  - SyncEngine logic
112
113
  - Dashboard UI
113
114
  - Admin Panel
114
115
  - Authentication/Authorization
115
- - Custom UI styling beyond Syncfusion defaults
116
+ - Custom UI styling beyond the approved UI library defaults
116
117
  - Repository layer without clear need
117
118
  - SignalR or real-time features
118
119
  - Background services (unless explicitly delegated)
@@ -120,10 +121,10 @@ Do not add by default in the first implementation task:
120
121
  ## 9. Pre-Execution Gate Additions
121
122
 
122
123
  - Confirm scaffold task does not silently add Identity, EF migrations, or extra hosting layers.
123
- - Confirm ODP.NET is isolated from EF Core DbContext (separate concerns).
124
- - Confirm SqlBulkCopy tasks are not combined with Oracle extraction tasks unless the task explicitly combines them with approval.
124
+ - Confirm the source connector is isolated from the EF Core DbContext (separate concerns).
125
+ - Confirm SqlBulkCopy tasks are not combined with source-extraction tasks unless the task explicitly combines them with approval.
125
126
  - Confirm database update commands are isolated in dedicated tasks.
126
- - Confirm Syncfusion license key is registered before any component usage.
127
+ - Confirm any licensed UI library's value is loaded from an approved secret/config source (not hardcoded) before use.
127
128
  - Confirm IIS hosting model is configured correctly (no Kestrel-only assumptions).
128
129
 
129
130
  ## 10. Acceptance Criteria Patterns
@@ -131,7 +132,7 @@ Do not add by default in the first implementation task:
131
132
  - .NET 8 solution builds cleanly with both projects.
132
133
  - Required packages are installed and version-compatible.
133
134
  - Solution can be published for IIS deployment (`dotnet publish -c Release`).
134
- - Oracle connection can be established (tested in dedicated task).
135
+ - External-source connection can be established (tested in dedicated task).
135
136
  - SQL Server config/logs schema can be created (tested in dedicated task).
136
137
  - No unapproved packages, entities, migrations, or auth were added.
137
138
  - No unapproved database changes were applied.
@@ -42,20 +42,20 @@
42
42
  11. Auto Backup
43
43
  12. اختبار + تسليم
44
44
 
45
- ## 4. First Task Rule
45
+ ## 4. First Task Rule — تفكيك (PROFILE-DN-F01)
46
46
 
47
- أول مهمة تنفيذ آمنة:
47
+ أول مهمة **ضيّقة** (لا دمج scaffold + DB + migration في مهمة واحدة):
48
48
 
49
49
  ```text
50
- TASK-COD-001: Scaffold WPF Project + SQLite Setup
50
+ TASK-COD-001: WPF Scaffold + الحزم المعتمدة فقط
51
+ TASK-COD-002: SQLite/EF Model + DbContext
52
+ TASK-COD-003: توليد Migration + مراجعة + تفويض التطبيق المحلي
53
+ TASK-COD-004: أول تدفق وظيفي (Login/Settings)
51
54
  ```
52
55
 
53
- يشمل:
54
- - `dotnet new wpf` مع هيكل MVVM (Models, ViewModels, Views, Services, Data)
55
- - إضافة حزمة `CommunityToolkit.Mvvm` و `Microsoft.EntityFrameworkCore.Sqlite`
56
- - إنشاء ApplicationDbContext + Seed (إن وجد)
57
- - تطبيق أول Migration
58
- - التأكد من أن التطبيق يشتغل (Run دون أخطاء)
56
+ - COD-001: `dotnet new wpf` + هيكل MVVM (Models, ViewModels, Views, Services, Data) + `CommunityToolkit.Mvvm` + `Microsoft.EntityFrameworkCore.Sqlite` — **دون** Migration أو Apply.
57
+ - COD-002: Entities + `AppDbContext` (+ Seed عند وجوده).
58
+ - COD-003: `dotnet ef migrations add` + مراجعة SQL + **تطبيق محلي مصرّح فقط**.
59
59
 
60
60
  ## 5. Scaffold Rules
61
61
 
@@ -63,17 +63,16 @@ TASK-COD-001: Scaffold WPF Project + SQLite Setup
63
63
  # إنشاء مشروع WPF
64
64
  dotnet new wpf -n MyApp -o .\src\MyApp
65
65
 
66
- # إضافة الحزم الأساسية
66
+ # الحزم الأساسية فقط
67
67
  dotnet add .\src\MyApp\MyApp.csproj package CommunityToolkit.Mvvm
68
68
  dotnet add .\src\MyApp\MyApp.csproj package Microsoft.EntityFrameworkCore.Sqlite
69
- dotnet add .\src\MyApp\MyApp.csproj package QuestPDF # للـ PDF
70
- dotnet add .\src\MyApp\MyApp.csproj package Microsoft.Office.Interop.Outlook
71
69
 
72
70
  # إنشاء مجلدات الهيكل
73
71
  New-Item -ItemType Directory -Path .\src\MyApp\Models, .\src\MyApp\ViewModels, .\src\MyApp\Views, .\src\MyApp\Services, .\src\MyApp\Data
74
72
  ```
75
73
 
76
74
  **قيود الـ Scaffold:**
75
+ - **حزم متأخرة (PROFILE-DN-F02):** `QuestPDF` تُضاف في **مهمة PDF فقط**، و`Microsoft.Office.Interop.Outlook` في **مهمة Outlook فقط** — لا في الـscaffold.
77
76
  - لا تنشئ `Views/` افتراضية غير Shutdown
78
77
  - لا تعدل `App.xaml` لتغيير StartupUri قبل تجهيز MainWindow
79
78
  - لا تنشئ واجهات Login قبل تجهيز منطق المصادقة
@@ -82,8 +81,9 @@ New-Item -ItemType Directory -Path .\src\MyApp\Models, .\src\MyApp\ViewModels, .
82
81
  ## 6. ORM / Database Rules
83
82
 
84
83
  - **حدود الـ EF Core Migrations:**
85
- - `Add-Migration <name>` لإنشاء migration
86
- - `Update-Database` لتطبيقها
84
+ - `dotnet ef migrations add <name>` لإنشاء migration (CLI المعلن — PROFILE-DN-F03)
85
+ - `dotnet ef database update` لتطبيقها — **بعد تفويض صريح للبيئة المحلية فقط**
86
+ - (Package Manager Console يعادلها `Add-Migration` / `Update-Database`، لكن استخدم `dotnet ef` حسب CLI المعلن)
87
87
  - لا تحذف migration موجودة
88
88
  - لا تعدل migration يدوياً إلا لتصحيح خطأ محدد
89
89
 
@@ -109,8 +109,8 @@ New-Item -ItemType Directory -Path .\src\MyApp\Models, .\src\MyApp\ViewModels, .
109
109
  | `dotnet add package ...` | يعدّل `.csproj` (إضافة PackageReference) |
110
110
  | `dotnet build` | لا تأثير جانبي — آمن |
111
111
  | `dotnet run` | لا تأثير جانبي — آمن |
112
- | `Add-Migration` | ينشئ ملف `.cs` في `Migrations/` |
113
- | `Update-Database` | ينشئ/يعدّل ملف `SQLite.db` في مجلد المشروع |
112
+ | `dotnet ef migrations add` | ينشئ ملف `.cs` في `Migrations/` |
113
+ | `dotnet ef database update` | ينشئ/يعدّل ملف `SQLite.db` في مجلد المشروع — بعد تفويض صريح |
114
114
  | `dotnet publish` | ينشئ مجلد `publish/` بالمخرجات القابلة للتوزيع |
115
115
 
116
116
  ## 8. Forbidden Defaults
@@ -124,7 +124,7 @@ New-Item -ItemType Directory -Path .\src\MyApp\Models, .\src\MyApp\ViewModels, .
124
124
  - ❌ **لا** إشعارات النظام
125
125
  - ❌ **لا** خلفية سيرفر DB (SQL Server, PostgreSQL)
126
126
  - ❌ **لا** Docker
127
- - ❌ **لا** Unit Tests (للمشاريع الصغيرة جداً — يُضاف إذا طُلب)
127
+ - ❌ **لا** إنشاء مشروع Test واسع في الـscaffold افتراضياً — تُضاف اختبارات **مركّزة** عندما يبرّرها السلوك/الخطر (PROFILE-DN-F04)
128
128
  - ❌ **لا** API endpoints
129
129
  - ❌ **لا** SignalR أو WebSockets
130
130
 
@@ -13,7 +13,7 @@ It is a **stack-specific Technology Profile** — loaded only when a project is
13
13
  | Profile ID | `flutter-mobile` |
14
14
  | Stack | Flutter + Dart |
15
15
  | Minimum Dart SDK | 3.0+ |
16
- | Minimum Flutter SDK | 3.16+ (current stable channel) |
16
+ | Minimum Flutter SDK | 3.16+ (حد أدنى؛ الفعلي = أحدث stable — يُسجَّل لكل مشروع في `PROJECT_RULES.md` §12) |
17
17
  | Status | Available |
18
18
  | Actual SDK | Log the per-project Flutter/Dart versions in `PROJECT_RULES.md` (required — §12) |
19
19
  | Owner | Tera Agent (decision engine) / EngineeringAgent (execution) |
@@ -366,5 +366,5 @@ Flutter release notes:
366
366
  - **Current Profile Version:** 1.0.0
367
367
  - **Last Updated:** 2026-07-15
368
368
  - **Maintainer:** TeraSystemEvolutionAgent (حارس)
369
- - **Flutter Baseline:** 3.16+ (stable channel)
369
+ - **Flutter Baseline:** 3.16+ (حد أدنى — النسخة الفعلية هي أحدث stable مُسجَّلة لكل مشروع)
370
370
  - **Dart Baseline:** 3.0+
@@ -1,7 +1,7 @@
1
1
  # Technology Profile: rust
2
2
 
3
- > **Status: Draft — Needs Verification** (SCP-2026-09-04-011)
4
- > مبني على بحث عميق 2026 من مصادر موثوقة (16 مصدراً: Corgea, Rust 2026 Template, onehorizon, Apollo skills, RuleSync, Agentbrisk, Axum/SQLx production guides...). **لم يُثبت بعد ببناء/اختبار فعلي محلي** (cargo غير مثبت على بيئة الإنشاء عند كتابة هذا البروفايل). ترقية الحالة إلى `Available` بعد تجربة تحقق (انظر §10).
3
+ > **Status: ✅ Available — Verified** (SCP-2026-09-04-011 → مُثبَّت عبر Pilot GEN-F05 · SCP-2026-09-29-017)
4
+ > مبني على بحث عميق 2026 من مصادر موثوقة (16 مصدراً: Corgea, Rust 2026 Template, onehorizon, Apollo skills, RuleSync, Agentbrisk, Axum/SQLx production guides...). **مُثبَّت الآن ببناء/اختبار فعلي محلي** (2026-09-29 — Pilot GEN-F05: `cargo build` + `cargo test` 2/2 + `clippy -D warnings` صفر + `fmt --check` PASS على rustc/cargo 1.98.1، بتحقق مستقل).
5
5
 
6
6
  ## 1. Profile Identity
7
7
 
@@ -152,12 +152,13 @@ large_enum_variant = "warn"
152
152
  ✅ لـ UI (Tauri/Web): Playwright/axe وفق قواعد المنظومة
153
153
  ```
154
154
 
155
- ### مسار الترقية إلى Available (خطوة التحقق المتبقية — بيئة تنفيذ بها cargo)
155
+ ### مسار الترقية ⟶ ✅ مُنجَز (Pilot GEN-F05 — 2026-09-29)
156
156
 
157
157
  ```text
158
- 1. cargo new verify-rust-cli → build + test + clippy -D warnings + fmt --check → PASS
159
- 2. (اختياري) مشروع Axum+SQLx صغير → build + migrate + test → PASS
160
- 3. عند النجاح: رفع حالة هذا البروفايل من "Draft" → "Available" في §1 + PROFILES_INDEX + TeraCapabilityMap
158
+ 1. ✅ cargo new verify-rust-cli → build + test (2/2) + clippy -D warnings (صفر) + fmt --check → PASS
159
+ [rustc/cargo 1.98.1 · تحقق مستقل — SCP-2026-09-29-017]
160
+ 2. ⏳ (اختياري، غير مُنجَز) مشروع Axum+SQLx صغير → build + migrate + test
161
+ 3. ✅ رُفعت الحالة "Draft" → "Available" في §1 + PROFILES_INDEX + TeraCapabilityMap
161
162
  ```
162
163
 
163
164
  ---