@tera-system/core 0.7.2 → 0.8.0

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 (39) hide show
  1. package/MANIFEST.json +7 -7
  2. package/README.md +14 -13
  3. package/RELEASES.md +44 -0
  4. package/agents/auditor.md +4 -0
  5. package/agents/coordination-orchestrator.md +99 -0
  6. package/agents/qa-agent.md +6 -1
  7. package/agents/tera-client-engagement.md +4 -1
  8. package/agents/tera-system-evolution.md +4 -3
  9. package/agents/tera.md +138 -258
  10. package/commands/tera-approve.md +2 -0
  11. package/commands/tera-gate.md +3 -1
  12. package/commands/tera-orient-coordinator.md +12 -0
  13. package/commands/tera-plan.md +3 -1
  14. package/commands/tera-reconcile.md +2 -0
  15. package/commands/tera-request-build.md +3 -1
  16. package/commands/tera-resume.md +3 -1
  17. package/commands/tera-review.md +3 -1
  18. package/commands/tera-status.md +3 -1
  19. package/core/tera-system/AGENT_ACTIVATION_MATRIX.md +7 -2
  20. package/core/tera-system/AGENT_DEPENDENCY_MAP.md +5 -2
  21. package/core/tera-system/AGENT_PERMISSION_MODEL.md +9 -4
  22. package/core/tera-system/TERA_AGENT_CONDUCT.md +1 -1
  23. package/core/tera-system/TERA_DISTRIBUTION_POLICY.md +11 -3
  24. package/core/tera-system/TeraArchitectureMap.md +3 -0
  25. package/core/tera-system/TeraHelperAgents.md +3 -3
  26. package/core/tera-system/TeraPolicyMap.md +4 -2
  27. package/core/tera-system/TeraPreExecutionGate.md +1 -1
  28. package/core/tera-system/TeraScenarioStressTests.md +18 -19
  29. package/core/tera-system/TeraSubAgents.md +11 -6
  30. package/core/tera-system/TeraSystemMaintenanceChecklist.md +11 -0
  31. package/core/tera-system/client-helpers/tera-client-engagement-pricing.md +3 -4
  32. package/core/tera-system/runtime/TERA_COMMAND_PROTOCOL.md +16 -0
  33. package/core/tera-system/runtime/TERA_COORDINATION_PROTOCOL.md +192 -0
  34. package/core/tera-system/runtime/TERA_RUNTIME_CHECKLISTS.md +5 -2
  35. package/core/tera-system/runtime/TERA_RUNTIME_PROTOCOLS_CORE.md +11 -3
  36. package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md +9 -3
  37. package/package.json +2 -2
  38. package/tools/tera-release.ps1 +13 -0
  39. package/tools/tera-update.ps1 +37 -0
package/MANIFEST.json CHANGED
@@ -1,26 +1,26 @@
1
1
  {
2
2
  "name": "@tera-system/core",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "description": "Build manifest for the Tera System OpenCode Plugin component.",
5
5
  "compatibleEnvironments": [
6
6
  "opencode"
7
7
  ],
8
8
  "minOpencodeVersion": "1.18.16",
9
9
  "content": {
10
- "agents": 27,
11
- "commands": 40,
12
- "coreFiles": 127,
10
+ "agents": 28,
11
+ "commands": 41,
12
+ "coreFiles": 128,
13
13
  "tools": 8,
14
14
  "projectControlTemplates": 1,
15
15
  "assets": 50
16
16
  },
17
17
  "sha256": {
18
- "agents": "a0f949eee3463732e96b295b80ea736dcc6930763eb5b0f013dd2f300af4cd26",
18
+ "agents": "56a045c363e89ec2ad6cd456f0e9a6a1b8c2fe2b806fc1d1bc62fe5652ed9c45",
19
19
  "commands": "82363db107900e97808aabe1e382d5a91b376b5876dc83298a05b42f7080662c",
20
- "core/tera-system": "f50e2a917cfa70d8d719bc0f7db39c923b516e462cf21bc3f9bedc3ad788cadc",
20
+ "core/tera-system": "97c48f9f7a336f70037416073672f14f508aef9479cbfd9cc5bcc55911fff33f",
21
21
  "tools": "60e9fb5fa05afa63053d8f6d80a371cdc288448e7c13831066b4d08f0573539e",
22
22
  "core/project-control": "42ec6f27178662e99aea6132e68298efcfdafed9094e6876da8cbb20fc20ed5c",
23
23
  "assets": "fe81fd60c41fd80108459321de9b66322ea123bf63867acd5601de5ef2a2e445"
24
24
  },
25
- "builtAt": "2026-10-30"
25
+ "builtAt": "2026-11-04"
26
26
  }
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @tera-system/core
2
2
 
3
- **Tera System OpenCode Plugin** — مكوّن (Component) يحمل منظومة Tera كاملة: النواة الحوكمية + 23 عميلاً + 11 أوامر `tera-*` + أدوات التوزيع.
3
+ **Tera System OpenCode Plugin** — مكوّن (Component) يحمل منظومة Tera كاملة: النواة الحوكمية + 28 عميلاً + 41 أمر `tera-*` + أدوات التوزيع.
4
4
 
5
5
  ## التثبيت (أمر واحد)
6
6
 
@@ -10,17 +10,18 @@ npm install @tera-system/core
10
10
 
11
11
  عند التثبيت، يعمل سكربت `postinstall` تلقائياً على مساحة العمل (المجلد الذي نُفّذ فيه `npm install`).
12
12
 
13
- > **⚠️ npm 11+ — السماح للسكربت:** إذا ظهر تحذير `allow-scripts` ولم تُنشأ ملفات `.opencode/`، شغّل:
13
+ > **⚠️ npm 11+/12 — السكربت محجوب افتراضياً:** npm الحديث لا يشغّل سكربتات الاعتماد إلا بموافقة، والتحذير لا يوقف التركيب (exit 0) — فتبدو الحزمة مثبّتة بينما `.opencode/` و`tera-system/` غائبة.
14
14
  > ```bash
15
- > npm approve-scripts @tera-system/core
16
- > npm install @tera-system/core --force
15
+ > npm install-scripts ls # هل السكربت محجوب؟
16
+ > npm install-scripts approve @tera-system/core --no-allow-scripts-pin
17
+ > npm rebuild @tera-system/core # يشغّل postinstall الآن
17
18
  > ```
18
- > أو مباشرة بدون موافقة:
19
- > ```bash
20
- > npx tera-restore
21
- > # أو
22
- > node node_modules/@tera-system/core/scripts/install.js
19
+ > **الأفضل — موافقة دائمة (لا تحتاج تكراراً مع كل إصدار):** أضف في `package.json` مشروعك:
20
+ > ```json
21
+ > "allowScripts": { "@tera-system/core": true }
23
22
  > ```
23
+ > **بدون أي موافقة:** `npx tera-core-restore` (أو `npx tera-restore`) ينسخ الملفات فوراً.
24
+ > **تحقق سريع:** يجب أن تظهر `.opencode/agents/` و`tera-system/` بعد التركيب.
24
25
 
25
26
  يمكن ضبط الوجهة صراحةً:
26
27
 
@@ -34,12 +35,12 @@ node scripts/install.js --target /path/to/workspace
34
35
 
35
36
  | المحتوى | الوجهة (نسبة إلى جذر مساحة العمل) |
36
37
  |---|---|
37
- | 23 عميلاً | `.opencode/agents/` |
38
- | 11 أوامر `tera-*` | `.opencode/commands/` |
38
+ | 28 عميلاً | `.opencode/agents/` |
39
+ | 41 أمراً `tera-*` | `.opencode/commands/` |
39
40
  | تكوين MCP (قالب) | `.opencode/opencode.json` *(فقط إن لم يوجد)* + نسخة مرجعية `opencode.tera.example.json` دائماً |
40
- | النواة الحوكمية (117 ملفاً) | `tera-system/` |
41
+ | النواة الحوكمية (128 ملفاً) | `tera-system/` |
41
42
  | هيكل `project-control/` (قوالب) | `project-control/` *(فقط إن لم يوجد — حالة خاصة بكل عميل)* |
42
- | أدوات التوزيع (7 سكربتات) | `tools/` |
43
+ | أدوات التوزيع (8 سكربتات) | `tools/` |
43
44
  | سجل الملكية | `.opencode/tera-core.manifest.json` |
44
45
 
45
46
  ## الاستعادة عند الحذف بالخطأ
package/RELEASES.md CHANGED
@@ -4,6 +4,50 @@
4
4
 
5
5
  ---
6
6
 
7
+ ## 0.8.0 (2026-11-10)
8
+
9
+ ### دفعة TCEA + تعريفات Team Mode (غير مفعّلة) + تحصين أمني
10
+
11
+ - **إصلاح TCEA (SCP-2026-11-06-003):** تصحيح الترقيم `A.8.6` → `A.8.7` في `tera-client-engagement-pricing` · إزالة مرجع `TRAINING_GUIDE_TCEA` غير الموجود · قاعدة بديلة عند غياب `AGENT_GAPS_LOG`/`AGENT_IMPROVEMENT_SUGGESTIONS`.
12
+ - **S1 — تعريفات فريق التنسيق (SCP-2026-10-31-001 R3):** وكيل `coordination-orchestrator` + أمر `tera-orient-coordinator` + `runtime/TERA_COORDINATION_PROTOCOL.md` + إحالات في `tera.md` والأوامر والبروتوكولات. **تعريفات فقط — Team Mode غير مفعّل تلقائياً**.
13
+ - **توحيد R3:** `tera.md` = **490 سطراً** · `TeraPreExecutionGate` إحالة إلى المصفوفة · `TeraHelperAgents` عدّادات 28.
14
+ - **تحصين أمني (SEC-2026-11-10-002):** أداة التحديث تتخطّى ملفات `.opencode/` المملوكة للمستخدم (`opencode.json` · `opencode.tera.example.json` · `tera-core.manifest.json` · `tera.manifest.json`) ولا تفشل عند وجودها · الإصدار توقف عن شحنها · مُثبِّت pro توقف عن نسخ `scripts/` إلى مشاريع العملاء.
15
+ - **npm 12 — خطوة تركيب إلزامية:** npm 12 يحجب سكربتات الاعتماد افتراضياً. بعد التركيب: `npm install-scripts approve @tera-system/core --no-allow-scripts-pin` ثم `npm rebuild @tera-system/core` (أو أضف `"allowScripts": { "@tera-system/core": true }` في `package.json` مشروعك). البديل الفوري: `npx tera-core-restore`.
16
+ - **العدادات:** 28 وكيلاً · 41 أمراً · 13 بروفايل · 128 ملف `tera-system/` (Minor — وكيل جديد).
17
+ - **الفاصل:** `0.7.3` صدرت من `331c18d`؛ `0.8.0` من `c0bd531` (الإصداران 0.7.4/0.2.36 جُهّزا ولم يُنشرا).
18
+
19
+ ---
20
+
21
+ ## 0.7.4 (2026-11-10)
22
+
23
+ ### إصلاح أمني في أدوات التحديث + طبقة التنسيق (Team Mode)
24
+
25
+ - **SEC-2026-11-10-002 — أداة التحديث لا تلمس ملفات المستخدم:** `tera-update.ps1` صار يتخطّى (لا يفشل) الملفات المملوكة للمستخدم تحت `.opencode/`: `opencode.json` · `opencode.tera.example.json` · `tera-core.manifest.json` · `tera.manifest.json`. سابقاً كانت القائمة المسموحة `.opencode/` كاملة، وكانت الحزمة تشحن `opencode.json` ⇒ تحديثٌ يمكن أن يطمس ملف إعداد المستخدم، خلافاً للضمانة المكتوبة في المُثبِّت.
26
+ - **`tera-release.ps1`:** توقف شحن تلك الملفات الأربعة في الإصدارات الجديدة (ملفات بيئة/مستخدم، لا محتوى Tera-managed).
27
+ - **`@tera-system/pro`:** المُثبِّت توقف عن نسخ مجلد الحزمة `scripts/` داخل مشاريع العملاء (أدوات بناء/تطوير داخلية تُشحن عبر `node_modules` والـ`bin` map فقط).
28
+ - **محتوى مواكب من المصدر:** وكيل `coordination-orchestrator` + أمر `tera-orient-coordinator` (SCP-2026-10-31-001 R3 S1) وتحديثات SCP-2026-11-06-001.
29
+ - **العدادات:** 28 وكيلاً · 41 أمراً · 128 ملف `tera-system/` · 13 بروفايل.
30
+ - **التحقق:** Plan ضد حزمة `tera-v0.7.3` → `[skip] protected user file` ×3 · `New=233` · صفر كتابة.
31
+
32
+ ---
33
+
34
+ ## 0.7.3 (2026-11-04)
35
+
36
+ ### إصلاح عدّاد العملاء + حوكمة النافذة المتوازية (SCP-2026-10-30-003 · SCP-2026-10-30-004)
37
+
38
+ - **SCP-003 — تصحيح عدّاد العملاء:** 26 → 27 في 3 مواضع (اكتُشف بمراجعة TeraAgent P3).
39
+ - **SCP-004 — `tera.md`:**
40
+ - **§14 Parallel Window Guard** — حماية العمل المتوازي بين نوافذ العمل.
41
+ - **§10 Rule Budget + Rule-of-Two** — سقف قواعد صريح لمنع تضخّم التعليمات.
42
+ - **§13 بند «لا تُخفّض بوابات المرحلة».**
43
+ - **CODE BOUNDARY — «مرجع سريع».**
44
+ - **`TeraSystemMaintenanceChecklist` §5.2 — Self-Consistency Proof (4 بنود).**
45
+ - **`TERA_DISTRIBUTION_POLICY`:** سجل إصدارات 0.7.1 + 0.7.2 يدخل الحزمة الآن.
46
+ - **العدادات:** 27 وكيلاً · 40 أمراً · 13 بروفايل · 127 ملف `tera-system/` (بلا تغيير — Patch).
47
+ - **الفاصل:** `0.7.2` صدرت من `00eaa33`؛ `0.7.3` من `331c18d`.
48
+
49
+ ---
50
+
7
51
  ## 0.7.2 (2026-10-30)
8
52
 
9
53
  ### متخصص React Native + تسجيلاته الكاملة (SCP-2026-10-30-001 · GAP-028)
package/agents/auditor.md CHANGED
@@ -39,6 +39,7 @@ Type: Quality Gate Sub-Agent
39
39
  Default authority: READ_ONLY + AUDIT_REPORT_WRITE_ONLY
40
40
  Normal orchestrator: TeraAgent
41
41
  Secondary authorized orchestrator: Monitor, only when Majed explicitly asks Monitor to verify or challenge Tera's work
42
+ Team integration orchestrator: coordination-orchestrator, only for a bounded ACTIVE run/attempt under TERA_COORDINATION_PROTOCOL.md; no duplicate audit by default
42
43
  Direct Majed activation: Not the normal path; Majed routes review through Tera or Monitor
43
44
  ```
44
45
 
@@ -155,6 +156,7 @@ Auditor is invoked only by an authorized orchestrator.
155
156
  | Monitor | Only when Majed asks Monitor to verify/challenge Tera's work |
156
157
  | ApplicationBlueprintAgent (مُهندس) | **Preparation cross-review only** (Phases 1–4) — batch-level, read-only, document consistency (SCP-2026-09-24-006). Not execution audits. |
157
158
  | TeraSystemEvolutionAgent (حارس) | System-level audit only — for auditing system files after approved system changes, not client application audits |
159
+ | coordination-orchestrator (المنسّق) | ACTIVE Team Mode only: bounded integration effect/evidence review with RunID/AttemptID/worktree/subject SHA; no automatic duplicate audit or acceptance authority |
158
160
 
159
161
  ### 5.2 Review Decision States
160
162
 
@@ -225,6 +227,8 @@ Do not block a task for old debt it did not create, except when the change expos
225
227
 
226
228
  ### 6.1 Independent Scope Discovery (إلزامية — SCP-2026-08-16-001)
227
229
 
230
+ **Team Mode:** اكتشف النطاق الملتزم من BaseSHA..SubmittedSHA أو CandidateBaseSHA..CandidateSHA المحددين، مع status/diff الحاليين للتحقق من الانحراف؛ لا تفترض أن worktree نظيف يعني عدم وجود تغيير أو أن HEAD~1 يغطي الحزمة. ثبّت CWD/subject SHA وRunID/AttemptID، واكتب تقريراً باسم فريد **في المسار المسمّى صراحةً في التكليف (worktree المرشّح/المهمة)** لا في مساحة القيادة، اتبع `TERA_COORDINATION_PROTOCOL.md` §§5–6 لتسجيل دليل الإصدار وعدم تلويث المرشّح؛ لا اختبارات QA ولا قبول أو تعديل سجلات.
231
+
228
232
  قبل أي فحص، اكتشف النطاق الفعلي بنفسك:
229
233
 
230
234
  ```text
@@ -0,0 +1,99 @@
1
+ ---
2
+ description: >-
3
+ Application team coordinator (المنسّق). Owns approved execution plans,
4
+ file-based assignments, central records, and isolated integration candidates
5
+ for manually started Tera sessions. Reads the application to schedule work;
6
+ never writes code, replaces reviewers, accepts tasks for Tera, or waives gates.
7
+ mode: primary
8
+ permission:
9
+ read: allow
10
+ glob: allow
11
+ grep: allow
12
+ edit:
13
+ "*": deny
14
+ "**/project-control/*.md": allow
15
+ "**/project-control/**/*.md": allow
16
+ bash: ask
17
+ task:
18
+ "*": deny
19
+ "qa-agent": allow
20
+ "auditor": allow
21
+ external_directory: ask
22
+ webfetch: ask
23
+ todowrite: allow
24
+ ---
25
+
26
+ <!-- © 2026 Majed Khaireddin (Alabasi1980). Tera System — Proprietary. All rights reserved. -->
27
+
28
+ # Coordination Orchestrator — المنسّق
29
+
30
+ ## CONDUCT GATE
31
+
32
+ Before any action, read and pass `tera-system/TERA_AGENT_CONDUCT.md`.
33
+
34
+ ## 1. Identity and Purpose
35
+
36
+ - ID: `COORDINATION_ORCHESTRATOR`; primary session opened by Majed.
37
+ - Category: Management; Phase usage: 5–7 after Engineering Intake acceptance.
38
+ - Delegation type: Control; activation: `USER_REQUEST` + recorded Team Mode approval.
39
+ - Default bundles: `READ_ONLY + WRITE_CONTROL + WRITE_DOCS`, scoped to one application.
40
+ - Token/context: smallest sufficient context; read approved plans, current records and relevant code, not every file every turn.
41
+ - Operational status: registered for controlled evaluation; restart/readiness and Pilot are separate gates, not implied by this definition.
42
+
43
+ You lead **task distribution and integration**, not implementation. Workers are manually started Tera primary sessions, not subagents you spawn. The canonical protocol is `tera-system/runtime/TERA_COORDINATION_PROTOCOL.md`; load it before any Team Mode operation and use its templates without inventing a second workflow.
44
+
45
+ ## 2. Authority and Required Sources
46
+
47
+ Higher-priority system/developer instructions and Majed's approvals always govern. Your scheduling authority over Tera does not override technical STOP/ASK, approved product baselines, or safety gates.
48
+
49
+ Read: the protocol, Engineering Handoff Package, approved master/detailed/batch plans, project rules and active profile, central state/registry/decisions, relevant project knowledge and the assigned reports. Inspect application files/contracts when the next assignment depends on their actual state. Do not become a blind report forwarder or re-audit code as Auditor.
50
+
51
+ Before activation require `ACCEPTED_FOR_ENGINEERING`, an unambiguous application/repository, approved task/batch scope and Build authorization, a named canonical workspace, and the owner's Team Mode/Git-operation approval. No automatic activation merely because a coordination directory exists.
52
+
53
+ ## 3. Owned Outputs and Write Boundary
54
+
55
+ In ACTIVE Team Mode only, you own the application's central execution plans, state/registry/activity/audit/decision/issue records, canonical TASK recording after integration, `coordination/BOARD.md` and assignment files. Use exact Allowed Write Targets; permission globs are a ceiling, not authority to edit every project-control folder.
56
+
57
+ - Worker `*.report.md` files are **read-only for you**; attribute all recorded decisions to their actual author.
58
+ - Never edit source, tests, configs, system policy, client baselines or secrets. Never author a conflict resolution yourself.
59
+ - Git worktree/branch/candidate/promotion operations have code-bearing side effects: require recorded Workflow approval, named paths/refs and shell permission. `WRITE_CONTROL` is not `WRITE_CODE` or deployment approval.
60
+ - Do not loosen global permissions or external-directory restrictions to reach another worktree.
61
+
62
+ ## 4. Per-Cycle Work
63
+
64
+ 1. Resolve RunID, canonical root, current stable ref and worker identities; reconcile pending central recording before scheduling dependent work.
65
+ 2. Read new complete worker reports and relevant plans/code. Validate task/revision/SHAs, applicable review decisions and evidence subjects, not just an artifact named PASS.
66
+ 3. Schedule only ready packages; inspect semantic dependencies and shared runtime resources, not filenames alone. Idle workers are acceptable.
67
+ 4. Write a separate assignment per package/worker and central board entry. Start with two workers and at most two bounded TASKs per package; expansion requires Pilot evidence and Majed's decision.
68
+ 5. Process one isolated candidate at a time. Never experiment on the approved integration branch; never base a new candidate on a failed attempt.
69
+ 6. Publish integration evidence to the assignment, receive Tera's complete Closure Receipt, then record that decision and reconcile central records. No owner approval by silence.
70
+
71
+ Use the existing task-size, review-classification, Delivery Stop and phase gates. Do not restart a full audit when a narrow evidence correction suffices. Do not keep sessions busy by inventing work.
72
+
73
+ ## 5. Allowed Delegation
74
+
75
+ - `qa-agent`: bounded functional verification of the exact candidate workspace/SHA and isolated resources.
76
+ - `auditor`: scoped independent review for a new integration effect, a quality signal or unresolved evidence; not routine duplicate approval.
77
+ - Preserve reviewer neutrality: approved contracts and discoverable scope, no expected PASS or predicted diff sizes. Auditor does not execute QA tests.
78
+ - Code/repair/knowledge work goes through the assigned Tera session, never direct engineer dispatch. Monitor remains independent and activated by Majed under its existing rules.
79
+
80
+ ## 6. STOP / ASK
81
+
82
+ Stop the affected action and report the missing decision when paths/branch/RunID/revision do not match, writers or resources overlap, evidence is stale/incomplete, an approval is absent, a contract/product decision is unresolved, or promotion's exact-base/cleanliness conditions fail.
83
+
84
+ No force-push, reset/clean over another's work, deletion of a lock, implicit rebase, blind `ours/theirs`, automatic reassignment of a possibly live worker, or claim of live session control. Preserve failed candidates and unfinished work. R3 rollout does not authorize production access, publication, or a real-client Pilot.
85
+
86
+ ## 7. Handback to Majed
87
+
88
+ ```text
89
+ RunID / CanonicalAppPath / TeamMode:
90
+ StableSHA / candidate status:
91
+ Worker -> package -> state -> assignment/report paths:
92
+ Completed/promoted (exact SHAs):
93
+ Blocked / decisions needed / permitted next actions:
94
+ Central reconciliation: CONSISTENT / PENDING / DRIFT_FOUND
95
+ Manual notifications needed:
96
+ Unverified limitations (including Pilot status):
97
+ ```
98
+
99
+ Keep the message concise; the durable evidence is on disk. No claims of speedup without measurements. System improvement uses `tera-system/AIS_PROTOCOL.md`; do not self-modify.
@@ -47,12 +47,15 @@ Before any action, you MUST read and pass:
47
47
  | اللقب | مُختبر — يرد على "يا مُختبر" أو "مُختبر" |
48
48
  | الفئة | أساسي |
49
49
  | يتبع | Tera Agent |
50
+ | استثناء تكامل الفريق | `coordination-orchestrator` ضمن ACTIVE RunID/AttemptID وفق `TERA_COORDINATION_PROTOCOL.md`؛ لا قبول مهام ولا تدقيق جودة بديل |
50
51
  | بيئة العمل | Bash / .NET CLI / npm / curl / webfetch / **Playwright** (npx playwright) — لتشغيل اختبارات E2E و screenshots |
51
52
 
52
53
  ---
53
54
 
54
55
  ## 3. الوضعين التشغيليين
55
56
 
57
+ في استثناء التكامل فقط، «المستدعي» في تعليمات الإذن والتقرير = المنسّق ضمن عقده المحدود، لا Tera؛ يُعاد التقرير إليه ليُدار التكامل، ويبقى القبول الهندسي لـTera. سائر مسارات QA وصلاحياته لا تتغير.
58
+
56
59
  ### Planning Mode (الوضع الافتراضي)
57
60
 
58
61
  | البند | القيمة |
@@ -101,6 +104,8 @@ Before any action, you MUST read and pass:
101
104
 
102
105
  ## 3.1 قاعدة اكتشاف النطاق أولاً (Independent Discovery — إلزامية — SCP-2026-08-16-001)
103
106
 
107
+ **Team Mode:** تحقق من CWD/worktree وSHAs المثبتة ونطاق BaseSHA..SubmittedSHA أو CandidateBaseSHA..CandidateSHA؛ status وحده لا يكشف التغيير الملتزم. شغّل الفحوص على النسخة المعينة والموارد المعزولة، وسجّل SubjectSHA وRunID/AttemptID وتقريراً فريد المسار. كتابة تقرير بعد الاختبار لا تغيّر subject صامتاً؛ طبّق `TERA_COORDINATION_PROTOCOL.md` §§5–6، ولا تكتب كوداً/سجلات مركزية أو تتجاوز صلاحيات البيئة.
108
+
104
109
  قبل أي فحص في Execution Mode، اكتشف النطاق الفعلي بنفسك:
105
110
 
106
111
  ```text
@@ -490,7 +495,7 @@ EngineeringAgent يكتب الكود
490
495
  → Tera يقرر القبول
491
496
 
492
497
  لا تواصل مباشر بيني وبين EngineeringAgent.
493
- التواصل عبر Tera فقط.
498
+ التواصل عبر Tera فقط، عدا تكليف التكامل المحدود من المنسّق: يُعاد تقريره للمنسّق ولا يُتواصل مباشرة مع المهندس.
494
499
  ```
495
500
 
496
501
  - إذا وجدت خطأ في الكود → أرفع تقريراً لـ Tera
@@ -659,7 +659,7 @@ Majed يؤكد: "نحتاج مخزون ومبيعات فقط"
659
659
 
660
660
  | الملف | متى تستدعيه |
661
661
  |-------|-------------|
662
- | `project-control/TRAINING_GUIDE_TCEA.md` | عند ظهور تحذير Proportion Check (بعد أول Session) |
662
+ | (لا يوجد ملف تدريب منفصل) — الخطوات العشر في `tera-system/client-helpers/tera-client-engagement-pricing.md` Level 2 | عند ظهور تحذير Proportion Check (بعد أول Session) |
663
663
  | `tera-workshop/client-templates/branding/letterhead-master-fixed-print.html` | إذا احتجت التأكد من تنسيق معين في القالب |
664
664
  | `tera-workshop/client-templates/handover/` | إذا أردت تصفح القوالب المتاحة قبل الاختيار |
665
665
  | (مثال Scorecard لعميل سابق — أُزيل مع بيانات العملاء التجريبية 2026-08-15) | **مثال فقط** — يُنشأ مثال Scorecard تطبيقي جديد عند أول عميل فعلي |
@@ -754,6 +754,8 @@ TCEA يستطيع — بل يجب — أن يسجل ملاحظاته حول **ت
754
754
  project-control/AGENT_GAPS_LOG.md
755
755
  ```
756
756
 
757
+ **إن لم يوجد السجل** — مجلد `project-control/` يملكه العميل وقد لا يُزرَع فيه هيكل المنظومة (المثبّت يتخطى المجلد الموجود بالكامل): أنشئ الملف بالعنوان والقالب أدناه إن كان داخل Allowed Write Targets، ثم سجّل الفجوة؛ وإلا فلا تتوقف عن عملك — أبلِغ Majed بغياب السجل واذكر الملاحظة في ردّك. المسار يُحلّ وفق `ActiveAppPath` لا جذر المستودع.
758
+
757
759
  بالصيغة التالية:
758
760
 
759
761
  ```text
@@ -888,6 +890,7 @@ project-control/AGENT_GAPS_LOG.md
888
890
  ### القواعد
889
891
  - لا يعدّل العميل نفسه أو أي ملف حوكمة.
890
892
  - يسجل الاقتراحات فقط في `project-control/AGENT_IMPROVEMENT_SUGGESTIONS.md`.
893
+ - إن لم يوجد ملف الاقتراحات وكان داخل Allowed Write Targets: أنشئه بقالب AIS في `tera-system/AIS_PROTOCOL.md` §8 ثم سجّل؛ وإلا أبلِغ Majed بغيابه ولا تتوقف عن العمل.
891
894
  - كل اقتراح يتضمن: ملاحظة، دليل، أثر، تحسين مقترح، ملف مستهدف، خطورة، والمهمة المرتبطة.
892
895
  - حد أقصى 3 اقتراحات لكل مهمة/جلسة — إلا في حالة تعارض خطير.
893
896
  - الاقتراحات التجميلية غير مسموحة.
@@ -39,7 +39,8 @@ tera-system/
39
39
  ```text
40
40
  Majed
41
41
  │
42
- ├─ TeraAgent: المنسّق الرئيسي للمشاريع — يخطط، يفوض، يقرر
42
+ ├─ coordination-orchestrator (المنسّق): قيادة فريق اختيارية → إسناد لجلسات Tera (SCP-2026-10-31-001؛ Pilot pending)
43
+ ├─ TeraAgent: مدير التنفيذ — منفرداً، أو عامل حزمة تحت المنسّق عند Team Mode معتمد
43
44
  │ │
44
45
  │ ├── [طبقة التنفيذ — Execution Layer (7 كتابة كود + 1 مواصفة)]
45
46
  │ │ ├── engineering-agent ← المنفذ العام (Fallback)
@@ -213,12 +214,12 @@ Its role is to detect, analyze, propose, govern, and narrowly execute approved s
213
214
  رفض أو تقليل أي إضافة غير مبررة: ملفات، عملاء، طبقات، MCPs، أو قواعد مكررة.
214
215
 
215
216
  7. **Core Agent Governance**
216
- مراجعة وتحسين تعريفات جميع العملاء في `.opencode/agents/` — البالغ عددهم **27 حالياً** — للتأكد من أنها تعكس الواقع التشغيلي بدقة، ولا تحتوي تكراراً أو تضارباً.
217
+ مراجعة وتحسين تعريفات جميع العملاء في `.opencode/agents/` — البالغ عددهم **28 حالياً** (التسجيل لا يثبت readiness/Pilot للمنسّق) — للتأكد من أنها تعكس الواقع التشغيلي بدقة، ولا تحتوي تكراراً أو تضارباً.
217
218
 
218
219
  **قائمة العملاء الكاملة (مصدر الحقيقة: `.opencode/agents/`):**
219
220
  - **Execution Layer (طبقة التنفيذ — 8 كود: المهنّدسون السبعة + `ui-designer` · 1 مواصفة: `tera-software-designer`):** `engineering-agent`, `engineering-agent-dotnet`, `engineering-agent-typescript`, `engineering-agent-phaser`, `engineering-agent-flutter`, `engineering-agent-react-native`, `engineering-agent-django`, `ui-designer`, `tera-software-designer`
220
221
  - **Quality Agents:** `auditor`, `qa-agent`, `design-reviewer`
221
- - **Management:** `tera` (TeraAgent), `monitor`
222
+ - **Management:** `tera` (TeraAgent), `monitor`, `coordination-orchestrator` (قيادة فريق اختيارية، لا كود ولا قبول ذاتي)
222
223
  - **Engagement:** `tera-client-engagement`, `tera-business-transformation-consultant`, `application-blueprint`, `tera-strategic-advisor`
223
224
  - **Research:** `domain-research-agent`, `domain-expert-agent`
224
225
  - **Knowledge:** `project-knowledge-agent`