@tera-system/core 0.2.4 → 0.2.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tera-system/core",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "Build manifest for the Tera System OpenCode Plugin component.",
5
5
  "compatibleEnvironments": [
6
6
  "opencode"
@@ -12,15 +12,15 @@
12
12
  "coreFiles": 111,
13
13
  "tools": 7,
14
14
  "projectControlTemplates": 1,
15
- "assets": 28
15
+ "assets": 29
16
16
  },
17
17
  "sha256": {
18
- "agents": "0dbd18c2289ef40f0c1a24b6a85d42a4aa02be4228ed5060b4e471cd422943de",
18
+ "agents": "627368c85eb5ab840986b6e8a60b08977803b73c52c698662bc6cc68a1254b7c",
19
19
  "commands": "a2520ceef3a3f4e9cec2e4c070aeecd41a215ed12438f81d45111e6c801f9ec2",
20
- "core/tera-system": "9d73d60f1b10460fb5e52ac2b80bd87fd224a6a63354d33268c2a8feb5a10805",
20
+ "core/tera-system": "527e36c620f68fe6c4c6056bd9345aca8f1c9eed7a028fe18d9b70c04dc1df51",
21
21
  "tools": "1f96a2de662c50c5c0a4c62d27ec583671c690163a0b35add036bfdd2b3a1f1a",
22
22
  "core/project-control": "cb979181d50e54c9b9b9173ffc890ca021bfaefe9678b1cad4a2f67ceac3dfdd",
23
- "assets": "46e250f6540a6e59f171bc3b34e661185e7c1ad981bca6322bf242c2985651f8"
23
+ "assets": "8def8ca49522949e601a3bd325809d124c6135e4700e0b156d594f50f3886b7c"
24
24
  },
25
- "builtAt": "2026-08-28"
25
+ "builtAt": "2026-08-29"
26
26
  }
package/RELEASES.md CHANGED
@@ -4,6 +4,32 @@
4
4
 
5
5
  ---
6
6
 
7
+ ## 0.2.6 (2026-08-29)
8
+
9
+ ### نظام ترميز الخطابات الصادرة للزبون (SCP-2026-08-29-005)
10
+
11
+ **الجديد:**
12
+ - **صيغة رسمية موحدة:** `{كود-العميل}-{النوع}-{السنة}-{التسلسل}` (مثال: NPB-LET-2026-004) — عبر كل المشاريع والمستودعات.
13
+ - **كود العميل من Majed فقط** — سجل مركزي `project-control/CLIENT_CODES.md` (المصدر الوحيد)، وحارس يرفع طلب كود لكل عميل جديد — الفريدية بنيوية (لا تكرار عبر المستودعات).
14
+ - **أنواع وثائق رسمية** (قابلة للزيادة بقرار Majed): LET / CON / ADD / PAL / DOC / TPL.
15
+ - **سجل خطابات العميل** `client-approval/LETTER_LOG.md` إلزامي — مصدر التسلسل المحلي، يُسجَّل قبل الإرسال.
16
+ - القاعدة في تدفق TCEA (A.4) + TeraClientPolicy §9.6 + خريطة السياسات.
17
+
18
+ ---
19
+
20
+ ## 0.2.5 (2026-08-29)
21
+
22
+ ### ملكية السورس كود + سياسة التسعير (SCP-2026-08-29-004)
23
+
24
+ **الجديد:**
25
+ - **قاعدة ملكية السورس:** السورس كود حق ملكية Tera — لا يُسلَّم للزبون افتراضياً (TeraPricingPolicy §31 + TeraClientPolicy §9.5 + العقد §12).
26
+ - **خيارا شراء:** L1 (Source Access — 40% من سعر المشروع) و L2 (ملكية داخلية — max(3×، 1,000 JOD)) عبر ملحق تعاقدي — وإعادة البيع مرفوضة افتراضياً (L3 = اتفاقية منفصلة بموافقة Majed).
27
+ - **اكتشاف مبكر:** سؤال توقع السورس إلزامي في Domain 13 قبل التسعير (بنك الأسئلة QS.1–QS.4).
28
+ - **نموذج جديد:** `tera-workshop/client-templates/contractual/SOURCE_CODE_PURCHASE_ADDENDUM_TEMPLATE.md` (assets 28→29).
29
+ - **قوالب محدثة:** العقد §8/§12، الاقتباسان (DRAFT + QUOTATION)، تقرير الهاندوف، حزمة تسليم العميل، خريطتا السياسات والمعمارية، مساعد التسعير A.8.6.
30
+
31
+ ---
32
+
7
33
  ## 0.2.4 (2026-08-29)
8
34
 
9
35
  ### إصلاح فجوة التغليف: شحن الحاسبة + قوالب المراسلات (SCP-2026-08-29-002)
@@ -225,6 +225,8 @@ Majed يفتحك ← حوار استكشافي ← Websearch عن التطبيق
225
225
  ← **طبّق Budget-to-Scope Control Rule (B.2)** — صنّف كل ميزة حسب أولويتها وميزانية العميل
226
226
  ← **سجّل كل قرار في CLIENT_DECISION_LOG.md (C.5, B.5)** — بحالة Approved/Deferred/Conditional/Pending Approval
227
227
  ← **طبّق Final Scope Reconciliation Gate (B.3)** — وحّد حالة كل ميزة في FEATURE_LIST.md
228
+ ← **ملكية السورس (SCP-2026-08-29-004):** سؤال توقع السورس في Domain 13 إلزامي قبل التسعير — الافتراضي: السورس ملك Tera ولا يُسلَّم. إذا توقعه الزبون → قدّم L1/L2 كبند منفصل بموافقة Majed (TeraPricingPolicy §31) — وإعادة البيع مرفوضة افتراضياً
229
+ ← **ترميز الخطابات (SCP-2026-08-29-005):** لا تُرسل أي مراسلة رسمية للزبون دون رقم رسمي بصيغة `{كود-العميل}-{النوع}-{السنة}-{التسلسل}` — كود العميل من Majed حصراً (سجل CLIENT_CODES المركزي — لا يُخترع ولا يُستنتج)، والتسلسل من `client-approval/LETTER_LOG.md` المحلي — أنشئ السجل وسجّل كل خطاب قبل إرساله (الأنواع: LET/CON/ADD/PAL/DOC/TPL — راجع TeraClientPolicy §9.6)
228
230
  ← التحقق من Quotation Readiness Gate (B.4) قبل DRAFT_QUOTATION.md
229
231
  ← إنتاج DRAFT_QUOTATION.md (Level 2) ← Majed يراجع ويعتمد
230
232
  ← **تأكيد Workspace Plan مع Majed (المسار: clients/CLIENT-NAME/applications/APP-NAME/، الاسم الرسمي، الهيكل المتوقع — تخطيط فقط لا إنشاء مجلدات)**
@@ -64,10 +64,33 @@
64
64
  - [ ] اشتراكات خارجية (تراخيص، APIs، خدمات طرف ثالث)
65
65
  - [ ] تكاليف الاستضافة
66
66
  - [ ] تكاليف الدومين و SSL
67
+ - [x] **السورس كود (ملك Tera — يُباع كخيار منفصل حسب TeraPricingPolicy §31)**
67
68
  - [ ] أخرى: _______
68
69
 
69
70
  ---
70
71
 
72
+ ## 5.1 ملكية السورس كود (إلزامي — SCP-2026-08-29-004)
73
+
74
+ > **السورس كود حق ملكية لمنظومة Tera ولا يُسلَّم ضمن هذا العرض.**
75
+ > خيارات شراء السورس متاحة بطلب منفصل بقرار Majed — وفق `TeraPricingPolicy.md` §31.
76
+ > **مهم:** سؤال توقع السورس في Domain 13 إلزامي قبل التسعير — سجّل النتيجة هنا.
77
+
78
+ | توقع الزبون (من Discovery Domain 13) | القرار |
79
+ |---|---|
80
+ | لا يتوقع السورس / غير متأكد | يُغلق بسطر الافتراضي أعلاه — بلا سعر |
81
+ | يتوقع السورس للصيانة | قدّم L1 (40%) كبند منفصل — بقرار Majed |
82
+ | يتوقع السورس لملكية كاملة | قدّم L2 (max(3×، 1,000 JOD)) — بقرار Majed |
83
+ | يطلب إعادة بيع/ترخيص | **رفض افتراضي + إحالة لـ Majed** (L3 — اتفاقية منفصلة) |
84
+
85
+ | خيار السورس (داخلي — لا يُعرض للزبون كسعر مفتوح) | السعر | مطبق؟ |
86
+ |---|---|---|
87
+ | L0 — ترخيص تشغيلي (الافتراضي) | — | [x] افتراضي |
88
+ | L1 — Source Access (صيانة داخلية) | 40% من سعر المشروع | [ ] |
89
+ | L2 — ملكية كاملة (استخدام داخلي) | max(3× السعر، 1,000 JOD) | [ ] |
90
+ | L3 — إعادة بيع تجاري | مرفوض افتراضياً — موافقة Majed الخاصة | [ ] |
91
+
92
+ ---
93
+
71
94
  ## 6. خطة الدفع المقترحة
72
95
 
73
96
  - [ ] 50% – 25% – 25% (Default)
@@ -99,6 +99,7 @@ status: TEMPLATE
99
99
  - رسوم بوابات الدفع
100
100
  - الاشتراكات الخارجية (تراخيص، APIs، خدمات طرف ثالث)
101
101
  - الاستضافة أو الدومين أو SSL (إلا إذا ذُكرت صراحة)
102
+ - **السورس كود — ملك مقدم الخدمة ولا يُسلَّم ضمن هذا العرض؛ خيارات شراء متاحة بطلب منفصل**
102
103
 
103
104
  ---
104
105
 
@@ -87,7 +87,8 @@ status: TEMPLATE
87
87
  - قيمة الخدمات وطريقة الدفع حسب عرض السعر المعتمد.
88
88
  - لا يبدأ العمل قبل استلام الدفعة المقدمة.
89
89
  - يحق لمقدم الخدمة إيقاف العمل مؤقتًا عند تأخر أي دفعة مستحقة.
90
- - لا يتم تسليم النسخة النهائية أو السورس أو الوصول الكامل إلا بعد تسوية الدفعات المستحقة، ما لم يتفق الطرفان خطيًا على خلاف ذلك.
90
+ - لا يتم تسليم النسخة النهائية (التطبيق قيد التشغيل والوثائق المتفق عليها) إلا بعد تسوية الدفعات المستحقة، ما لم يتفق الطرفان خطيًا على خلاف ذلك.
91
+ - **السورس كود لا يُسلَّم ضمن هذه الاتفاقية** إلا بموجب «ملحق شراء السورس» معتمد وبعد سداد كامل مقابل الملحق — راجع البند 12.
91
92
 
92
93
  ---
93
94
 
@@ -117,8 +118,10 @@ status: TEMPLATE
117
118
 
118
119
  ## 12. الملكية الفكرية والسورس
119
120
 
120
- - يتم تحديد ملكية السورس وحق الاستخدام في عرض السعر أو نطاق العمل.
121
- - ما لم ينص الاتفاق خلاف ذلك، يحتفظ مقدم الخدمة بحق استخدام المعرفة العامة والقوالب والمكونات العامة والخبرات غير الخاصة بالعميل.
121
+ - **السورس كود حق ملكية لمقدم الخدمة (Tera) ولا ينتقل إلى العميل افتراضياً.** يحصل العميل على ترخيص استخدام تشغيلي للتطبيق ضمن أعماله فقط.
122
+ - لا يُسلَّم السورس كود بأي شكل (مستودع، ملفات، نسخ، أرشيف) إلا بموجب «ملحق شراء السورس» معتمد يحدد مستوى الحقوق والمقابل وفق سياسة التسعير (§31 من TeraPricingPolicy) — ويتم نقل الوصول أو الملكية **بعد سداد كامل مقابل الملحق**.
123
+ - **إعادة بيع السورس أو التطبيق أو ترخيصه للغير ممنوعة دائماً** في المستويات L1 وL2، ما لم يُنص صراحة على خلاف ذلك في اتفاقية ترخيص/امتياز منفصلة معتمدة خطياً من الطرف الأول.
124
+ - يحتفظ مقدم الخدمة بملكية المعرفة العامة والقوالب والمكونات المشتركة (واجهات، أنماط هندسة، مكونات جاهزة) المستخدمة في التطبيق — ولا تشملها أي ملكية تُمنح للعميل بموجب ملحق شراء السورس.
122
125
  - لا تنتقل أي ملكية أو صلاحيات نهائية قبل سداد المستحقات المتفق عليها.
123
126
 
124
127
  ---
@@ -0,0 +1,100 @@
1
+ ---
2
+ document_type: source_code_purchase_addendum
3
+ template_version: v1.0
4
+ category: contractual
5
+ used_by: TeraClientEngagementAgent
6
+ client_facing: true
7
+ approval_required: Majed
8
+ client_signature_required: true
9
+ legal_review_required: true
10
+ pricing_policy: tera-system/TeraPricingPolicy.md (§31)
11
+ status: TEMPLATE
12
+ ---
13
+
14
+ # ملحق شراء السورس كود — `[ADDENDUM_ID]`
15
+
16
+ > **نوع الوثيقة:** ملحق تعاقدي لاتفاقية الخدمات البرمجية `[AGREEMENT_ID]`
17
+ > **تنبيه:** قالب مسودة قانونية — لا يُستخدم رسمياً إلا بعد مراجعة قانونية واعتماد Majed.
18
+ > **المرجع الحاكم:** `TeraPricingPolicy.md` §31 — ملكية السورس كود والتسليم.
19
+
20
+ ---
21
+
22
+ ## 1. الأطراف
23
+
24
+ | الطرف | الاسم |
25
+ |---|---|
26
+ | مقدم الخدمة (Tera) | `[PROVIDER_NAME]` |
27
+ | العميل | `[CLIENT_NAME]` |
28
+
29
+ ---
30
+
31
+ ## 2. مستوى شراء السورس (اختر واحداً)
32
+
33
+ | المستوى | الحقوق | السعر |
34
+ |---:|---|---|
35
+ | **L1 — Source Access** | وصول السورس لصيانة/تعديل فريق العميل أو مورد معتمد | `[L1_PRICE]` JOD (40% من سعر المشروع) |
36
+ | **L2 — ملكية كاملة (استخدام داخلي)** | كل L1 + تعديل وإعادة استخدام داخل أعمال العميل وفروعه | `[L2_PRICE]` JOD (max(3× سعر المشروع، 1,000 JOD)) |
37
+
38
+ **المستوى المختار:** `[L1 / L2]` — بمبلغ **`[TOTAL_ADDENDUM]` JOD**
39
+
40
+ ---
41
+
42
+ ## 3. الحقوق الممنوحة
43
+
44
+ - `[LEVEL_RIGHTS]` — حسب المستوى المختار في البند 2.
45
+
46
+ ---
47
+
48
+ ## 4. الممنوعات (سارية دائماً في L1 و L2)
49
+
50
+ - ❌ إعادة بيع السورس أو التطبيق أو ترخيصه للغير بأي شكل.
51
+ - ❌ النشر العام للمستودع أو رفع الكود على منصات عامة.
52
+ - ❌ إعادة استخدام السورس في منتج/خدمة تُقدَّم للغير (خارج أعمال العميل وفروعه).
53
+ - ❌ إزالة أو إخفاء علامات الملكية أو إشعارات الحقوق من الملفات.
54
+
55
+ ---
56
+
57
+ ## 5. المقابل المالي والدفع
58
+
59
+ - قيمة الملحق: **`[TOTAL_ADDENDUM]` JOD** — تُدفع دفعة واحدة **قبل** تسليم الوصول/الملكية.
60
+ - **لا يُسلَّم السورس كود أو يُنقل أي وصول قبل سداد 100% من مقابل هذا الملحق.**
61
+ - تأخير السداد يوقف نقل الوصول دون اعتبار ذلك إخلالاً من مقدم الخدمة.
62
+
63
+ ---
64
+
65
+ ## 6. طريقة التسليم
66
+
67
+ - عبر مستودع خاص (Private Repository) أو أرشيف مشفّر يُسلَّم بقناة آمنة.
68
+ - لا يُنشر الكود على أي منصة عامة.
69
+ - (L2) يُوقَّع على إقرار نقل الملكية بعد السداد الكامل.
70
+
71
+ ---
72
+
73
+ ## 7. بقاء ملكية مكونات Tera المشتركة
74
+
75
+ - تبقى ملكية المكونات المشتركة (واجهات، أنماط هندسة، قوالب، مكونات جاهزة) **لمقدم الخدمة** ولا تشملها هذه الصفقة — ويُزيل مقدم الخدمة أي مكوّن مشترك مطلوب قبل التسليم أو يرخّصه للاستخدام ضمن التطبيق فقط.
76
+
77
+ ---
78
+
79
+ ## 8. الضمان
80
+
81
+ - الضمان الوارد في الاتفاقية الأصلية (البند 11) يسري على التطبيق المُسلَّم — ولا يشمل تعديلات العميل اللاحقة على السورس.
82
+
83
+ ---
84
+
85
+ ## 9. إقرار طرفي الاتفاقية
86
+
87
+ - يقرّ الطرفان بأن ملكية السورس تنتقل (أو يُمنح الوصول) وفق البند 2 فقط، وبأنهما اطّلعا على الممنوعات في البند 4 والتزما بها.
88
+
89
+ ---
90
+
91
+ ## 10. التوقيع
92
+
93
+ | الطرف | الاسم | التوقيع / الإقرار | التاريخ |
94
+ |---|---|---|---|
95
+ | العميل | `[CLIENT_SIGNATORY]` | `[SIGN_CLIENT]` | `[DATE]` |
96
+ | مقدم الخدمة | `[PROVIDER_SIGNATORY]` | `[SIGN_PROVIDER]` | `[DATE]` |
97
+
98
+ ---
99
+
100
+ > **ملاحظات الاستخدام:** لا يُعرض هذا الملحق في العرض الأولي — يُقدَّم فقط عند طلب الزبون صراحة للسورس، وبعد موافقة Majed على المستوى والسعر.
@@ -44,6 +44,8 @@ status: TEMPLATE
44
44
  | 2 | `[DELIVERABLE_2]` | تم التسليم / معلق | `[D2_NOTES]` |
45
45
  | 3 | `[DELIVERABLE_3]` | تم التسليم / معلق | `[D3_NOTES]` |
46
46
 
47
+ > **غير مُسلَّم ضمن هذه العملية (ملك Tera):** السورس كود بأي شكل — إلا بموجب «ملحق شراء السورس» معتمد (L1/L2 وفق TeraPricingPolicy §31) — وإعادة بيعه أو ترخيصه للغير ممنوعة دائماً.
48
+
47
49
  ---
48
50
 
49
51
  ## 4. البنود المعلقة
@@ -350,6 +350,26 @@ Once all relevant domains have been covered and Tera has a complete picture, pro
350
350
 
351
351
  ---
352
352
 
353
+ ## الملكية والسورس كود — أسئلة إلزامية (SCP-2026-08-29-004)
354
+
355
+ > تُطرح في **Domain 13 (Acceptance & Commercials)** قبل إغلاق Discovery وقبل أي تسعير.
356
+ > المصدر الحاكم: `TeraPricingPolicy.md` §31 + `TeraClientPolicy.md` §9.5.
357
+
358
+ - **QS.1:** هل يتوقع الزبون استلام السورس كود؟ (نعم / لا / غير متأكد)
359
+ - **QS.2:** هل لدى الزبون سياسة داخلية تشترط امتلاك السورس؟
360
+ - **QS.3:** (إذا نعم) لأي غرض أساساً؟ (صيانة داخلية / ملكية كاملة للاستخدام الداخلي / إعادة بيع أو ترخيص للغير)
361
+ - **QS.4:** هل قبل الزبون سابقاً نماذج ترخيص تشغيل بدون سورس؟
362
+
363
+ **قرار التوجيه:**
364
+ | النتيجة | الإجراء |
365
+ |---|---|
366
+ | لا يتوقع / غير متأكد | سطر الافتراضي في العرض: "السورس غير مشمول" — بلا سعر |
367
+ | يتوقع للصيانة | عرض L1 (40%) كبند منفصل — بقرار Majed |
368
+ | يتوقع ملكية كاملة | عرض L2 (max(3×، 1,000 JOD)) — بقرار Majed |
369
+ | يطلب إعادة بيع/ترخيص | **رفض افتراضي + إحالة لـ Majed** (اتفاقية منفصلة فقط) |
370
+
371
+ ---
372
+
353
373
  ## Usage Rules
354
374
 
355
375
  1. **Tera does not ask all questions.** Select the essential ones first, then deep-dive only in domains that need it.
@@ -16,7 +16,7 @@ It is a map, not a policy source. Rules remain in the files listed in `TeraPolic
16
16
  | Strategic advisory and decision support | Helps Majed evaluate whether a decision, project, fork, or direction is right before execution; advisory only, no approval or execution authority | `.opencode/agents/tera-strategic-advisor.md` |
17
17
  | Project intake | Captures raw idea, technical context, missing information, and readiness | `TeraProjectIntakePolicy.md`, `project-inputs/` |
18
18
  | Client engagement and approval | Manages client profile, contacts, approval package, and change control — the commercial truth layer | `TeraClient*.md`, `clients/`, `.opencode/agents/tera-client-engagement.md` |
19
- | Solution preparation (phases 1–4) | Owned by مُهندس (ApplicationBlueprintAgent). Converts confirmed handoff into blueprint, intake, project decision, preparation planning, delegation, cross-review, baseline, and Engineering Handoff Package | `.opencode/agents/application-blueprint.md`, `Tera_Project_Preparation_Files.md`, `agent-helpers/Tera_Project_Preparation_Files_Conditional.md`, `project-preparation/`, `runtime/TERA_SOLUTION_PREPARATION_*.md` |
19
+ | Solution preparation (phases 1–4) | Owned by مُهندس (ApplicationBlueprintAgent). Converts confirmed handoff into blueprint, intake, project decision, preparation planning, delegation, cross-review, baseline, and Engineering Handoff Package | `.opencode/agents/application-blueprint.md`, `Tera_Project_Preparation_Files.md`, `project-preparation/`, `runtime/TERA_SOLUTION_PREPARATION_*.md` |
20
20
  | Design governance | Controls design source decisions, design tokens, component rules, internal kits, and UI acceptance | `tera-system/design-system/`, `project-preparation/28_UI_UX_GUIDELINES.md` |
21
21
  | Engineering handoff gate | Two-gate handoff between مُهندس and Tera: Solution Readiness Gate → Engineering Handoff Package → Engineering Intake Gate | `ENGINEERING_HANDOFF_PACKAGE.md`, `project-control/` |
22
22
  | Execution orchestration (phases 5–7) | Owned by TeraAgent (Engineering Delivery Lead). Execution planning, delegation to Coding/QA/Audit agents, Pre/Post gates, implementation, delivery, closure | `TeraPreExecutionGate.md`, `runtime/TERA_RUNTIME_*.md`, `project-control/` |
@@ -25,7 +25,7 @@ It is a map, not a policy source. Rules remain in the files listed in `TeraPolic
25
25
  | Sub-agent lifecycle | Defines, generates, narrows, activates, and reviews specialized agents | `TeraSubAgents.md`, `AGENT_GENERATION_TEMPLATE.md`, `generated-agents/` |
26
26
  | 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/` |
27
27
  | Project implementation knowledge | Maintains concise current-state operational knowledge per screen/module/service | `project-knowledge/` داخل كل تطبيق |
28
- | Tera distribution and versioning | Builds releases and distributes Tera to client repositories in a versioned, verifiable way; clients derive updates from the origin repository (RepositoryUrl) via fetch + verified release packages (Tag + Manifest + SHA lockfile + updater tools); ownership contract separates Tera-managed from client-owned files | `tera-system/TERA_DISTRIBUTION_POLICY.md`, `tools/tera-fetch.ps1`, `tools/tera-release.ps1`, `tools/tera-update.ps1`, `.tera/lock.json` داخل مستودعات العملاء |
28
+ | Tera distribution and versioning | Builds releases and distributes Tera to client repositories in a versioned, verifiable way; clients derive updates from the origin repository (RepositoryUrl) via fetch + verified release packages (Tag + Manifest + SHA lockfile + updater tools); ownership contract separates Tera-managed from client-owned files | `tera-system/TERA_DISTRIBUTION_POLICY.md`, `tera-workshop/tools/tera-fetch.ps1`, `tera-workshop/tools/tera-release.ps1`, `tera-workshop/tools/tera-update.ps1`, `.tera/lock.json` داخل مستودعات العملاء |
29
29
 
30
30
  ## 3. Folder Roles
31
31
 
@@ -41,10 +41,9 @@ It is a map, not a policy source. Rules remain in the files listed in `TeraPolic
41
41
  | `tera-system/design-system/` | System design governance, schemas, gates, internal kits | Project-specific design decisions |
42
42
  | `tera-system/profiles/` | Technology-specific execution rules | Generic project policy |
43
43
  | `tera-system/knowledge-base/` | Reusable domain knowledge references | Project-specific client facts |
44
- | `tera-system/product-standards/` | Reusable active product standards | Runtime policy, client-specific records, or application code |
45
44
  | `tera-system/engineering-helpers/` | Shared engineering reference files | Language-specific profiles |
46
45
  | `tera-workshop/` | System development and tooling files | Core policy or project files |
47
- | `tools/` | Official Tera updater tooling (tera-update.ps1 + batch updater) used to pin/upgrade Tera in client repositories | Client application code; replacing client-owned files |
46
+ | `tera-workshop/tools/` | Official Tera updater tooling (tera-update.ps1 + batch updater) used to pin/upgrade Tera in client repositories | Client application code; replacing client-owned files |
48
47
  | `book/` | Comprehensive user-facing documentation and guides (Quick Start, Vision, Quality, Policies) | Runtime operational files; per-project records |
49
48
  | `architecture/` | Structurizr C4 workspace (`.dsl` source of truth + exported diagrams) | Application code; client project files |
50
49
 
@@ -67,7 +66,7 @@ Client / User Idea
67
66
  ```text
68
67
  Client Registration → Contacts → Application Intake
69
68
  → Client Questions through Majed → Discovery Coverage
70
- → Client Approval Package → Approval Record → Prototype Approval (Gate 6 — Tera first task TASK-PROTO-* + formal letter) → Execution Authorization (Gate 7)
69
+ → Client Approval Package → Approval Record → Execution Authorization
71
70
  → TCEA Handoff to مُهندس
72
71
  → مُهندس: Blueprint + Phases 1–4 → Solution Baseline
73
72
  → Solution Readiness Gate → Engineering Handoff Package
@@ -75,6 +74,8 @@ Client Registration → Contacts → Application Intake
75
74
  → Change Control for later requests
76
75
  ```
77
76
 
77
+ **ملكية المخرجات (SCP-2026-08-29-004):** السورس كود ملك Tera ولا يُسلَّم للزبون افتراضياً — يُسلَّم التطبيق قيد التشغيل + الوثائق. خيارا L1/L2 (TeraPricingPolicy §31) عبر ملحق تعاقدي؛ إعادة البيع مرفوضة افتراضياً.
78
+
78
79
  ## 6. Runtime Design Principle
79
80
 
80
81
  All core runtime agents must pass the conduct gate in `tera-system/TERA_AGENT_CONDUCT.md`.
@@ -100,9 +100,9 @@ Tera must not treat approval from a contact as final unless that contact has doc
100
100
 
101
101
  ### Client Discovery Output — Application Proposal
102
102
 
103
- After the Client Discovery + Smart Interview process completes (see `TERA_RUNTIME_PROTOCOLS_CLIENT.md` Section 18), the designated agent (TCEA for external clients, مُهندس for internal projects — SCP-2026-07-28-118) generates a **professional client-facing Application Proposal** as an HTML page using `tera-workshop/client-templates/commercial/APPLICATION_PROPOSAL_TEMPLATE.md`.
103
+ After the Client Discovery + Smart Interview process completes (see `TERA_RUNTIME_PROTOCOLS_CLIENT.md` Section 18), the designated agent (TCEA for external clients, مُهندس for internal projects — SCP-2026-07-28-118) generates a **professional client-facing Application Proposal** as an HTML page using `tera-workshop/APPLICATION_PROPOSAL_TEMPLATE.html`.
104
104
 
105
- The proposal captures: understanding, users & roles, scope (MVP + out-of-scope), requirements by domain, assumptions, and proposed roadmap. Generated from `tera-workshop/client-templates/commercial/APPLICATION_PROPOSAL_TEMPLATE.md`.
105
+ The proposal captures: understanding, users & roles, scope (MVP + out-of-scope), requirements by domain, assumptions, and proposed roadmap. Generated from `tera-workshop/APPLICATION_PROPOSAL_TEMPLATE.html`.
106
106
 
107
107
  The proposal is saved under `clients/.../client-approval/` and **must be approved by the client** before formal preparation begins. The approved proposal becomes the official scope reference for all subsequent gates.
108
108
 
@@ -203,7 +203,7 @@ The default mandatory package is:
203
203
  - `10_CLIENT_APPROVAL_RECORD.md`
204
204
  - `11_CHANGE_CONTROL.md`
205
205
 
206
- If a file is not applicable to a very small project, Tera must still create an explicit section in `10_CLIENT_APPROVAL_RECORD.md` explaining why it is not applicable and what replaced it. Exception: `08_PROTOTYPE_PLAN.md` may not be marked not applicable except with a documented Majed waiver (WAIVED_BY_MAJED) — the prototype is mandatory for all applications (SCP-2026-08-28-001).
206
+ If a file is not applicable to a very small project, Tera must still create an explicit section in `10_CLIENT_APPROVAL_RECORD.md` explaining why it is not applicable and what replaced it.
207
207
 
208
208
  ### Approval Gates
209
209
 
@@ -214,35 +214,9 @@ If a file is not applicable to a very small project, Tera must still create an e
214
214
  | Gate 3: Flow Approval | The client confirms the main user and business flows. |
215
215
  | Gate 4: Screen Approval | The client confirms the screen list and screen purposes. |
216
216
  | Gate 5: Design Direction Approval | The client confirms visual direction, tone, and references. |
217
- | Gate 6: Prototype Approval | The client confirms the actual prototype (built and reviewed) via a formal approval letter. Mandatory for all applications. Exception: documented Majed waiver (WAIVED_BY_MAJED). |
217
+ | Gate 6: Prototype Approval | The client confirms the prototype or prototype plan when applicable. |
218
218
  | Gate 7: Execution Authorization | The client authorizes moving into implementation. |
219
219
 
220
- ### Prototype Mandate (SCP-2026-08-28-001)
221
-
222
- ```text
223
- 1. Every application — external or internal — requires an approved prototype before
224
- real implementation. The only exception is a documented Majed waiver
225
- (WAIVED_BY_MAJED) recorded in 10_CLIENT_APPROVAL_RECORD.md with a reason.
226
- No agent may override this gate.
227
- 2. The prototype is built by Coding Agents under Tera as the FIRST execution task
228
- (TASK-PROTO-*), isolated under project-control/prototypes/ — non-production,
229
- deleted or archived after approval. DesignReviewer (ناقد) reviews it before
230
- it is shown to Majed and the client (Maker/Checker pattern).
231
- 3. Coverage: all screens listed in 06_SCREEN_MAP.md. Large applications use waves
232
- (critical transaction/input screens first); reducing waves is a Majed decision only.
233
- 4. Approval evidence: a formal Prototype Approval Letter (see
234
- tera-workshop/client-templates/contractual/PROTOTYPE_APPROVAL_LETTER_TEMPLATE.md)
235
- confirming the screens/fields/flows as prototyped, and acknowledging that any
236
- later impactful change = priced Change Request on the client's responsibility.
237
- The letter is the Gate 6 evidence; without it (or a Majed waiver) the prototype
238
- is not approved.
239
- 5. The prototype must trace strictly to the approved baseline
240
- (07_SCREENS_AND_UI_STRUCTURE.md) — it validates and surfaces gaps; it does not
241
- invent requirements. Objections within approved scope = free design iteration
242
- (baseline update via مُهندس when needed). Expansion beyond approved scope =
243
- priced Change Request (MR4).
244
- ```
245
-
246
220
  ### Approval Record
247
221
 
248
222
  `10_CLIENT_APPROVAL_RECORD.md` must document:
@@ -379,6 +353,73 @@ Client-facing content must protect clarity, scope, and trust.
379
353
 
380
354
  ---
381
355
 
356
+ ## 9.5 ملكية السورس كود (SCP-2026-08-29-004)
357
+
358
+ ```text
359
+ السورس كود حق ملكية Tera — لا يُسلَّم للزبون افتراضياً في أي مشروع.
360
+ التسعير والعروض والعقود والتسليم لا تفترض أن السورس للزبون.
361
+ ```
362
+
363
+ - **الافتراضي:** العميل يحصل على ترخيص استخدام تشغيلي للتطبيق فقط. السورس لا يُسلَّم بأي شكل.
364
+ - **عند اشتراط الزبون للسورس:** يُعرض خيارا L1 (Source Access — 40% من سعر المشروع) أو L2 (ملكية داخلية — max(3×، 1,000 JOD)) وفق `TeraPricingPolicy.md` §31 — عبر «ملحق شراء السورس» معتمد، وبنقل الوصول بعد سداد 100%.
365
+ - **إعادة بيع السورس أو التطبيق أو ترخيصه للغير: مرفوضة افتراضياً** — تُعالج فقط باتفاقية ترخيص/امتياز منفصلة بموافقة Majed الخاصة.
366
+ - مكونات Tera المشتركة (واجهات، أنماط هندسة، قوالب) تبقى ملك Tera في كل الأحوال.
367
+ - سؤال توقع السورس إلزامي في Discovery (Domain 13) قبل أي تسعير — راجع بنك الأسئلة.
368
+
369
+ ---
370
+
371
+ ## 9.6 ترميز الخطابات والوثائق الصادرة للزبون (SCP-2026-08-29-005)
372
+
373
+ ```text
374
+ المبدأ: لا تُرسل أي مراسلة رسمية للزبون دون رقم رسمي فريد — الترميز موحّد
375
+ عبر كل المشاريع والمستودعات، وغير قابل للتكرار بين أي زبونين.
376
+ ```
377
+
378
+ ### الصيغة الرسمية
379
+
380
+ ```text
381
+ {كود-العميل}-{نوع-الوثيقة}-{السنة}-{التسلسل}
382
+ مثال: NPB-LET-2026-004
383
+ ```
384
+
385
+ | المكوّن | المصدر | القاعدة |
386
+ |---|---|---|
387
+ | **كود-العميل** (مثل NPB) | **Majed فقط** — عبر طلب يرفعه حارس من السجل المركزي `project-control/CLIENT_CODES.md` | يُخصص مرة واحدة ولا يُعاد استخدامه أبداً — يضمن الفريدية عبر المستودعات |
388
+ | **نوع-الوثيقة** | التصنيف الرسمي أدناه | ثابت — يُضاف نوع جديد بقرار Majed |
389
+ | **السنة** | سنة الإصدار | 4 أرقام |
390
+ | **التسلسل** | سجل خطابات العميل `client-approval/LETTER_LOG.md` | عداد تصاعدي لكل (نوع + سنة) داخل نفس العميل — يبدأ من 001 |
391
+
392
+ ### أنواع الوثائق الرسمية (قابلة للزيادة)
393
+
394
+ | الرمز | النوع | أمثلة |
395
+ |:---:|---|---|
396
+ | **LET** | خطاب / مراسلة رسمية | عرض السعر، اعتماد النطاق، الاعتماد التجاري، إشعارات (ملكية سورس وغيرها) |
397
+ | **CON** | عقد / اتفاقية | اتفاقية خدمات برمجية، نطاق عمل (SOW)، ميثاق مشروع، NDA |
398
+ | **ADD** | ملحق تعاقدي | ملحق شراء سورس، ملحق ملكية/دفع |
399
+ | **PAL** | خطاب اعتماد بروتوتايب | اعتماد البروتوتايب |
400
+ | **DOC** | وثيقة معلومات | ملخص اجتماع/فهم، نطاق تفصيلي، ملخص تجاري |
401
+ | **TPL** | نموذج / استمارة | طلب تغيير، تقرير حالة |
402
+
403
+ > **إضافة نوع جديد:** بقرار Majed فقط (عبر حارس) — لا يضيفه عميل المنظومة من تلقاء نفسه.
404
+
405
+ ### سجل خطابات العميل — `client-approval/LETTER_LOG.md` (إلزامي لكل عميل)
406
+
407
+ | العمود | المعنى |
408
+ |---|---|
409
+ | رقم الخطاب | `{كود}-{نوع}-{سنة}-{تسلسل}` |
410
+ | التاريخ | تاريخ الإصدار |
411
+ | النوع | من التصنيف الرسمي |
412
+ | المرجع/الملف | مسار/اسم ملف الخطاب |
413
+ | الحالة | أُرسل / بانتظار رد / معتمد / ملغي |
414
+
415
+ **قواعد:**
416
+ 1. يُنشأ `LETTER_LOG.md` عند أول خطاب لكل عميل ويُحدَّث قبل إرسال أي خطاب.
417
+ 2. التسلسل = آخر رقم من نفس (النوع + السنة) + 1.
418
+ 3. أي خطاب بلا رقم رسمي = مخالفة — لا يُرسل.
419
+ 4. كود العميل لا يُستنتج ولا يُخترع — يُؤخذ من Majed حصراً.
420
+
421
+ ---
422
+
382
423
  ## 10. Relationship to Internal Tera Files
383
424
 
384
425
  Client files are official relationship and approval records.
@@ -38,7 +38,7 @@ Project files record project-specific decisions.
38
38
  | TCEA commercial value discovery (MR6) | `.opencode/agents/tera-client-engagement.md` (A.6.0 MR6) | `.opencode/agents/tera.md` | 6th Master Rule: TCEA must actively discover value-added opportunities — propose as options, not commitments. |
39
39
  | TCEA value-added proposals protocol | `tera-system/client-helpers/tera-client-engagement-protocols.md` (A.6.10) | Not applicable | Detailed protocol for commercial proposals: types, rules, template, connection to Future-Proof Discovery. |
40
40
  | Solution preparation (phases 1–4) | `.opencode/agents/application-blueprint.md` | `.opencode/agents/tera.md` (reference only) | Owned by مُهندس. Covers blueprint, intake, project decision, preparation planning, delegation, cross-review, baseline, and Engineering Handoff. SCP-2026-07-28-118. |
41
- | Preparation file catalog | `tera-system/Tera_Project_Preparation_Files.md` + `tera-system/agent-helpers/Tera_Project_Preparation_Files_Conditional.md` | `TERA_PROJECT_DECISION.md` | Main guide/index plus on-demand companion for conditional and supporting files. Owned by مُهندس during preparation. |
41
+ | Preparation file catalog | `tera-system/Tera_Project_Preparation_Files.md` | `TERA_PROJECT_DECISION.md` | Comprehensive preparation files **Guide** (catalog + per-file purpose/questions/outputs) owned by مُهندس during preparation. Classified as reference Guide — not split (2026-08-01). |
42
42
  | Project decision template | `tera-system/TERA_PROJECT_DECISION.md` + `tera-system/runtime/TERA_SOLUTION_PREPARATION_TEMPLATES.md` §1 | Not applicable | Owned by مُهندس. 13-section structure. |
43
43
  | 7-phase Tera workflow | `.opencode/agents/tera.md` §11 (phases 5–7) + `.opencode/agents/application-blueprint.md` (phases 1–4) | Runtime files as referenced | Phases 1–4: مُهندس. Phases 5–7: Tera. SCP-2026-07-28-118. |
44
44
  | Phase 3 preparation planning output | `tera-system/runtime/TERA_SOLUTION_PREPARATION_TEMPLATES.md` §2 | `.opencode/agents/application-blueprint.md` | Produces `PREPARATION_PLAN.md`; owned by مُهندس. |
@@ -47,9 +47,9 @@ Project files record project-specific decisions.
47
47
  | Solution preparation templates | `tera-system/runtime/TERA_SOLUTION_PREPARATION_TEMPLATES.md` | `.opencode/agents/application-blueprint.md` | Phase 1–4 output templates for مُهندس. SCP-2026-07-28-118. |
48
48
  | Engineering handoff | `project-control/ENGINEERING_HANDOFF_PACKAGE.md` (produced by مُهندس, consumed by Tera) | `.opencode/agents/tera.md` §6 | Two-gate handoff: Solution Readiness → Engineering Intake. |
49
49
  | Phase 5 execution planning outputs | `tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md` Sections 29-31 | `.opencode/agents/tera.md`, `TERA_RUNTIME_CHECKLISTS.md`, `TeraPreExecutionGate.md` | Produces `PROJECT_MASTER_PLAN.md`, `PROJECT_DETAILED_EXECUTION_PLAN.md`, and `EXECUTION_BATCH_PLAN.md`. Split notice INS-02: Sections 29-31 moved to DELIVERY file. |
50
- | Phase 6 post-execution review template | `tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md` Section 32 | `TASK_TEMPLATE.md`, `TeraPreExecutionGate.md`, `TERA_RUNTIME_CHECKLISTS.md` | Used inside `TASK-COD-*` before final acceptance or closure. Note: `TASK_TEMPLATE.md` lives at `project-control/templates/TASK_TEMPLATE.md` (clarified INS-07, 2026-08-01). Split notice INS-02: Section 32 moved to DELIVERY file. |
50
+ | Phase 6 post-execution review template | `tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md` Section 32 | `TASK_TEMPLATE.md`, `TeraPreExecutionGate.md`, `TERA_RUNTIME_CHECKLISTS.md` | Used inside `TASK-COD-*` before final acceptance or closure. Note: `TASK_TEMPLATE.md` lives at `project-control/tasks/TASK_TEMPLATE.md` (clarified INS-07, 2026-08-01). Split notice INS-02: Section 32 moved to DELIVERY file. |
51
51
  | Phase 7 delivery, handover, and closure | `.opencode/agents/tera.md` Section 5 + `TERA_RUNTIME_TEMPLATES_DELIVERY.md` Section 35 | `.opencode/agents/tera.md`, `TERA_RUNTIME_CHECKLISTS.md`, `TERA_RUNTIME_PROTOCOLS.md` | Project closure is separate from last TASK-COD closure. Phase 7 does not execute code. Split notice INS-02: Section 34 moved to DELIVERY file. |
52
- | Sub-agent registry (core) | `tera-system/TeraSubAgents.md` | `.opencode/agents/tera.md` | Core agents (Engineering, QA, Auditor, Software Designer, DesignReviewer) — 904 lines 🟡 |
52
+ | Sub-agent registry (core) | `tera-system/TeraSubAgents.md` | `.opencode/agents/tera.md` | Core agents (Engineering, QA, Auditor, Software Designer) — 769 lines 🟢 |
53
53
  | Sub-agent registry (helpers) | `tera-system/TeraHelperAgents.md` | `.opencode/agents/tera.md` | Helper agents (Security, DevOps, Domain, ERP, etc.) — 964 lines 🟢 — split from TeraSubAgents.md via SCP-2026-07-26 |
54
54
  | Agent generation template | `tera-system/AGENT_GENERATION_TEMPLATE.md` | `TERA_RUNTIME_PROTOCOLS_CORE.md` | Draft agents use this source. |
55
55
  | Pre/Post execution gates | `tera-system/TeraPreExecutionGate.md` | `.opencode/agents/tera.md`, `TERA_RUNTIME_PROTOCOLS_CORE.md` | Gate details stay in the policy file. |
@@ -61,8 +61,7 @@ Project files record project-specific decisions.
61
61
  | Runtime checklists | `tera-system/runtime/TERA_RUNTIME_CHECKLISTS.md` | `.opencode/agents/tera.md` | Checklists stay outside runtime. |
62
62
  | MVP classification | `tera-system/runtime/MVP_DEFINITION_PROTOCOL.md` | `.opencode/agents/tera.md` | Runtime references when to load it. |
63
63
  | Technology profiles | `tera-system/profiles/` | `.opencode/agents/tera.md` | Stack-specific rules stay in profiles. |
64
- | Design governance layer | `tera-system/design-system/` | `.opencode/agents/tera.md`, `TERA_RUNTIME_CHECKLISTS.md`, `TERA_RUNTIME_PROTOCOLS_CORE.md` | Governs Design Source Decision, DESIGN.md integration, internal kits, design tokens, component rules, and UI Acceptance Gate. DesignReviewer (ناقد) = Tera-managed review sub-agent (SCP-2026-08-28-001) with three shields (neutrality / direct escalation / dual invocation). |
65
- | Prototype mandate | `tera-system/TeraClientPolicy.md` (Prototype Mandate — SCP-2026-08-28-001) | `TERA_RUNTIME_TEMPLATES.md` (08_PROTOTYPE_PLAN.md), `TERA_RUNTIME_PROTOCOLS_CLIENT.md`, `TeraPreExecutionGate.md` (#23) | Gate 6 mandatory for all applications; waiver = documented `WAIVED_BY_MAJED` only. Builder: Coding Agents under Tera (TASK-PROTO-*); reviewer: DesignReviewer (ناقد); evidence: formal Prototype Approval Letter. |
64
+ | Design governance layer | `tera-system/design-system/` | `.opencode/agents/tera.md`, `TERA_RUNTIME_CHECKLISTS.md`, `TERA_RUNTIME_PROTOCOLS_CORE.md` | Governs Design Source Decision, DESIGN.md integration, internal kits, design tokens, component rules, and UI Acceptance Gate. |
66
65
  | Monitor audit framework | `.opencode/agents/monitor.md` | `ENGINEERING_AGENT_RESPONSIBILITIES.md` | Governs the 7 immutable audit rules, reference hierarchy, plan rejection authority, and cumulative audit for plan-compliance checking. |
67
66
  | Auditor audit framework | `.opencode/agents/auditor.md` | `ENGINEERING_AGENT_RESPONSIBILITIES.md` | Governs Auditor as a Tera-managed quality gate sub-agent, including diff-first scope, evidence model, QUAUD reporting, and authorized invocation by Tera/Monitor. |
68
67
  | Quality gate thresholds | `tera-system/engineering-governance/QUALITY_GATE_THRESHOLDS.md` | `.opencode/agents/auditor.md`, `.opencode/agents/tera.md` | Compact reference for Auditor rule classes, evidence requirements, P1/P2 checks, and default heuristics. |
@@ -105,8 +104,9 @@ Project files record project-specific decisions.
105
104
  | 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. |
106
105
  | BTCA — Methodology Framework | `tera-system/consulting-helpers/BTCA_METHODOLOGY_FRAMEWORK.md` | `.opencode/agents/tera-business-transformation-consultant.md` | إطار المنهجية: تصنيف الأدلة الخماسي، مراحل العمل، دليل المقابلات، هيكل التقرير النهائي. |
107
106
  | BTCA — Report Templates | `tera-system/consulting-helpers/BTCA_REPORT_TEMPLATES.md` | `.opencode/agents/tera-business-transformation-consultant.md` | قوالب التقارير العشرة الأساسية + التقرير التنفيذي. |
108
- | Tera distribution (versioned) | `tera-system/TERA_DISTRIBUTION_POLICY.md` | `.tera/lock.json` في مستودعات العملاء | توزيع Tera المُروّس على مستودعات العملاء: استمداد من المستودع الأصلي (`tera-fetch.ps1` + RepositoryUrl)، إصدارات (Tag+SHA)، عقد ملكية، أدوات `tools/`. SCP-2026-08-15-009. |
109
- | Tera product standards Maintenance | `tera-system/product-standards/maintenance-apps/STANDARD_DEFINITION.md` + `BEST_PRACTICES_DOMAIN.md` | Not applicable | Active reusable product standards for Maintenance/FSM/WOM; content remains in the standards files. |
107
+ | Tera distribution (versioned) | `tera-system/TERA_DISTRIBUTION_POLICY.md` | `.tera/lock.json` في مستودعات العملاء | توزيع Tera المُروّس على مستودعات العملاء: استمداد من المستودع الأصلي (`tera-fetch.ps1` + RepositoryUrl)، إصدارات (Tag+SHA)، عقد ملكية، أدوات `tera-workshop/tools/`. SCP-2026-08-15-009. |
108
+ | 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. |
109
+ | 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. |
110
110
 
111
111
  ## 4. Duplication Policy
112
112
 
@@ -690,3 +690,45 @@ max(Final Scorecard Price, 100 JOD, Minimum Profitable Price)
690
690
  | 6 | الحد الأعلى للتخفيض الخاص | 15% |
691
691
  | 7 | إعادة مراجعة Anchor Points | بعد اختبار 3 - 5 مشاريع فعلية |
692
692
  | 8 | الحد الأدنى لتقدير الساعات (Minimum Hours for Direct Pricing) | 40 ساعة |
693
+ | 9 | نسبة سعر السورس L1 (Source Access) | 40% من سعر المشروع |
694
+ | 10 | مضاعف سعر السورس L2 (ملكية كاملة للاستخدام الداخلي) | 3× سعر المشروع — بحد أدنى 1,000 JOD |
695
+
696
+ ---
697
+
698
+ ## 31. ملكية السورس كود والتسليم (SCP-2026-08-29-004)
699
+
700
+ > **المصدر الحاكم:** هذا القسم + `TeraClientPolicy.md` + عقد `SOFTWARE_SERVICES_AGREEMENT` §12 — مصدر الحقيقة الوحيد لموضوع ملكية السورس.
701
+
702
+ ### 31.1 المبدأ الحاكم
703
+
704
+ ```text
705
+ السورس كود التطبيقات حق ملكية لمنظومة Tera — ولا يُسلَّم للزبون افتراضياً أبداً.
706
+ التسعير والوثائق والعقود والتسليم لا تفترض أن السورس كود للزبون نهائياً.
707
+ ```
708
+
709
+ ### 31.2 المخرجات الافتراضية (ما يُسلَّم في السعر الأساسي)
710
+
711
+ | يُسلَّم | لا يُسلَّم |
712
+ |---|---|
713
+ | التطبيق قيد التشغيل (استضافة Tera أو خادم العميل) | السورس كود بأي شكل (مستودع، ملفات، نسخ، أرشيف) |
714
+ | النشر والإعداد والتوثيق ودليل الاستخدام | مكونات Tera المشتركة (teranoo-ui، أنماط الهندسة، القوالب) |
715
+ | التدريب | بيانات/إعدادات داخلية خاصة بـ Tera |
716
+ | الضمان والصيانة (§22) | |
717
+
718
+ ### 31.3 خيارات شراء السورس — تُقدَّم عند طلب الزبون فقط
719
+
720
+ | المستوى | الحقوق الممنوحة | الممنوعات | السعر |
721
+ |:---:|---|---|---|
722
+ | **L0 — الافتراضي** | ترخيص استخدام تشغيلي للتطبيق ضمن أعمال العميل | السورس بأي شكل | ضمن سعر المشروع |
723
+ | **L1 — Source Access** | وصول السورس لصيانة/تعديل فريق العميل أو مورد معتمد | إعادة بيع، ترخيص للغير، استخدام في منتج آخر، نشر عام للمستودع | **40% من سعر المشروع** |
724
+ | **L2 — ملكية كاملة (استخدام داخلي)** | كل L1 + تعديل وإعادة استخدام داخل أعمال العميل وفروعه | إعادة بيع/ترخيص التطبيق كمنتج للغير | **max(3× سعر المشروع، 1,000 JOD)** |
725
+ | **L3 — إعادة البيع/الترخيص التجاري** | — | — | **ليست بند سعر:** رفض افتراضي + اتفاقية ترخيص/امتياز منفصلة بموافقة Majed الخاصة فقط |
726
+
727
+ ### 31.4 قواعد تشغيلية إلزامية
728
+
729
+ 1. **سؤال توقع السورس إلزامي في Domain 13 قبل أي تسعير** (راجع بنك الأسئلة + discovery-domains.md) — لا يُسعَّر مشروع قبل معرفة توقع الزبون.
730
+ 2. **العرض الرسمي للزبون:** يُعلن "السورس كود غير مشمول — خيارات متاحة بطلب منفصل" **دون أسعار مفتوحة**. الأسعار الداخلية (الجدول أعلاه) تظهر في DRAFT فقط وقرار عرضها لـ Majed.
731
+ 3. **أي تسليم سورس (L1/L2) يمر عبر «ملحق شراء السورس»** المعتمد — يحدد المستوى والحقوق والممنوعات، ويتم نقل الوصول/الملكية **بعد سداد 100% من مقابل الملحق**.
732
+ 4. **إعادة البيع ممنوعة دائماً** في L1 وL2. L3 لا يُعرض ولا يُناقش تسويقياً.
733
+ 5. مكونات Tera المشتركة تبقى ملك Tera في كل الأحوال ولا تشملها أي ملكية تُمنح.
734
+ 6. عند توقع الزبون للسورس: يُرفع الخيار لـ Majed مع التوصية قبل إدراجه في الاقتباس — لا يُسعَّر السورس تلقائياً.
@@ -27,7 +27,7 @@ description: Canonical source for the 13 mandatory TCEA discovery domains — si
27
27
  | 10 | Technical, Hosting & Compliance | Technical, Hosting & Compliance | Stack, hosting, domain, SSL, compliance needs + **تفضيل منطقة الاستضافة (محلية/دولية) والمبرر** | نعم | نعم |
28
28
  | 11 | Security & Audit | Security & Audit | Auth method, data sensitivity, audit trail | نعم | نعم |
29
29
  | 12 | Integrations & APIs | Integrations & APIs | Third-party APIs, webhooks, data sync | نعم | نعم |
30
- | 13 | Acceptance, Commercials & Warranty | Acceptance, Commercials & Warranty | Acceptance criteria, budget, payment plan, warranty, support terms | نعم | نعم |
30
+ | 13 | Acceptance, Commercials & Warranty | Acceptance, Commercials & Warranty | Acceptance criteria, budget, payment plan, warranty, support terms + **توقع السورس كود (نعم/لا/غير متأكد) والغرض** — راجع TeraPricingPolicy §31 | نعم | نعم |
31
31
 
32
32
  ---
33
33
 
@@ -41,6 +41,7 @@ description: Canonical source for the 13 mandatory TCEA discovery domains — si
41
41
  6. **المجال 13 (Acceptance, Commercials & Warranty)** يتطلب تغطية 3 جوانب داخلية على الأقل: (أ) معايير القبول والاختبارات, (ب) الميزانية وخطة الدفع, (ج) الضمان والصيانة.
42
42
  7. **Content Type Rule (SCP-2026-08-15-016):** إذا كان Content Type = `User-Facing Content` أو `Mixed` (موقع/صفحة هبوط/تسويق/محتوى)، تُفعَّل **Content Confirmation Gate** في مرحلة التحضير (بعد `07_SCREENS_AND_UI_STRUCTURE.md` وقبل التصميم النهائي)، ويُشترط `CONTENT_REQUIREMENTS.md` معتمد من المالك في Solution Readiness Gate. التطبيقات القياسية (Application Data فقط) لا تُفعَّل — Anti-Bloat.
43
43
  8. **Non-Functional Depth Rule (SCP-2026-08-29-001):** بنود العمق غير الوظيفي — تفضيلات الزبون في التصميم والمحتوى والشاشات والتقنية (مراجع بصرية، ألوان/نبرة، شكل العرض الرئيسي، حقول الشاشات، منطقة الاستضافة) — إلزامية التغطية قبل إعلان `Complete` للمجالات 6/9/10 (و4 حسب Content Type Rule أعلاه)، بعمق متناسب مع حجم المشروع (نفس مبدأ A.4). إذا لم يجب الزبون أو لم تتوفر المعلومة → `Partial` + `UNCERTAINTY_NOTICE` — لا يجوز `Complete`. الأسئلة المرجعية في `TeraApplicationQuestionBank.md` (Q5.2/Q5.3/Q5.7/Q5.15/Q4.12/Q7.1 وغيرها).
44
+ 9. **Source Ownership Rule (SCP-2026-08-29-004):** توقع السورس كود يُسأل في Domain 13 قبل أي تسعير. **الافتراضي: السورس ملك Tera ولا يُسلَّم.** عند توقع الزبون للسورس → يُعرض خيارا L1/L2 (TeraPricingPolicy §31) كبند منفصل بقرار Majed — وإعادة البيع/الترخيص للغير مرفوضة افتراضياً (L3 = اتفاقية منفصلة بموافقة Majed الخاصة).
44
45
 
45
46
  ---
46
47
 
@@ -133,6 +133,18 @@ description: TCEA pricing workflow, tools, reference sources, and client documen
133
133
  | دليل التدريب | `project-control/TRAINING_GUIDE_TCEA.md` | مرجع تدريب فقط — لا يُقرأ افتراضياً. يُستدعى فقط عند تحذير Proportion Check |
134
134
  | مثال تطبيقي | (يُنشأ عند أول عميل فعلي — أُزيل مثال العملاء التجريبيين 2026-08-15) | عند الحاجة يُنشأ مثال Scorecard تطبيقي جديد |
135
135
 
136
+ ### A.8.6 ملكية السورس كود (SCP-2026-08-29-004)
137
+
138
+ | البند | القاعدة |
139
+ |-------|--------|
140
+ | **الافتراضي** | السورس ملك Tera — لا يُسلَّم للزبون. العرض يعلن "غير مشمول" دون أسعار مفتوحة. |
141
+ | **L1 — Source Access** | وصول للصيانة الداخلية = **40% من سعر المشروع** |
142
+ | **L2 — ملكية كاملة (داخلي)** | **max(3× سعر المشروع، 1,000 JOD)** |
143
+ | **L3 — إعادة بيع** | مرفوض افتراضياً — اتفاقية منفصلة بموافقة Majed الخاصة |
144
+ | **قبل التسعير** | سؤال توقع السورس في Domain 13 إلزامي (بنك الأسئلة QS.1–QS.4) |
145
+ | **التسليم** | عبر «ملحق شراء السورس» — بعد سداد 100% — إعادة البيع ممنوعة دائماً |
146
+ | **المرجع** | `TeraPricingPolicy.md` §31 + `TeraClientPolicy.md` §9.5 |
147
+
136
148
  ---
137
149
 
138
150
  ## C.1 الملفات التي تديرها
@@ -1,8 +1,8 @@
1
1
  # Tera Runtime Templates — Delivery & Execution
2
2
 
3
- These are the execution, delivery, closure, and operational-hardening templates (Sections 29–38) split from TERA_RUNTIME_TEMPLATES.md via INSPECTION-2026-08-01 (INS-02).
3
+ These are the execution, delivery, and closure templates (Sections 29–34) split from TERA_RUNTIME_TEMPLATES.md via INSPECTION-2026-08-01 (INS-02).
4
4
  Main file: `tera-system/runtime/TERA_RUNTIME_TEMPLATES.md` (Sections 1–28).
5
- Preparation-phase templates: `tera-system/runtime/TERA_RUNTIME_TEMPLATES_PREPARATION.md` (Sections 35–41).
5
+ Preparation-phase templates: `tera-system/runtime/TERA_RUNTIME_TEMPLATES_PREPARATION.md` (Sections 35–40).
6
6
 
7
7
  ---
8
8
 
@@ -493,8 +493,11 @@ clients/CLIENT-[client-name-or-id]/applications/APP-[app-name-or-id]/delivery/CL
493
493
 
494
494
  ## 2. ما تم تسليمه
495
495
 
496
+ - التطبيق قيد التشغيل (رابط/بيئة النشر) + التوثيق + التدريب (حسب النطاق)
496
497
  - ...
497
498
 
499
+ > **غير مُسلَّم (ملك Tera — SCP-2026-08-29-004):** السورس كود بأي شكل، إلا بموجب ملحق شراء سورس معتمد (L1/L2 — TeraPricingPolicy §31). إعادة البيع/الترخيص للغير ممنوعة دائماً.
500
+
498
501
  ## 3. طريقة التشغيل / الوصول
499
502
 
500
503
  - لا تكتب أسرارًا أو كلمات مرور.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tera-system/core",
3
- "version": "0.2.4",
4
- "description": "Tera System OpenCode Plugin — governance core, 20 agents, 11 commands, distribution tools (personal edition)",
3
+ "version": "0.2.6",
4
+ "description": "Tera System OpenCode Plugin أ¢â‚¬â€‌ governance core, 20 agents, 11 commands, distribution tools (personal edition)",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
7
7
  "engines": {
@@ -40,3 +40,4 @@
40
40
  "access": "public"
41
41
  }
42
42
  }
43
+