@tera-system/core 0.6.2 → 0.7.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.
- package/MANIFEST.json +7 -7
- package/RELEASES.md +12 -0
- package/agents/auditor.md +3 -3
- package/agents/security-agent.md +200 -0
- package/agents/tera-system-evolution.md +2 -2
- package/agents/tera.md +1 -1
- package/commands/tera-orient-shield.md +14 -0
- package/core/tera-system/AGENT_ACTIVATION_MATRIX.md +3 -1
- package/core/tera-system/AGENT_DEPENDENCY_MAP.md +2 -1
- package/core/tera-system/AGENT_PERMISSION_MODEL.md +1 -1
- package/core/tera-system/SECURITY_TEAM_CHARTER.md +1 -1
- package/core/tera-system/TERA_DISTRIBUTION_POLICY.md +1 -1
- package/core/tera-system/TeraArchitectureMap.md +1 -1
- package/core/tera-system/TeraHelperAgents.md +1 -0
- package/core/tera-system/TeraPolicyMap.md +1 -1
- package/core/tera-system/TeraPreExecutionGate.md +1 -1
- package/core/tera-system/TeraSubAgents.md +10 -9
- package/package.json +2 -2
package/MANIFEST.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tera-system/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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":
|
|
11
|
-
"commands":
|
|
10
|
+
"agents": 26,
|
|
11
|
+
"commands": 39,
|
|
12
12
|
"coreFiles": 126,
|
|
13
13
|
"tools": 8,
|
|
14
14
|
"projectControlTemplates": 1,
|
|
15
15
|
"assets": 50
|
|
16
16
|
},
|
|
17
17
|
"sha256": {
|
|
18
|
-
"agents": "
|
|
19
|
-
"commands": "
|
|
20
|
-
"core/tera-system": "
|
|
18
|
+
"agents": "a6327d2957333c2c0df5eb0fe28f311182eca6979d741db818621c3bfa900c5d",
|
|
19
|
+
"commands": "5a253c682d859424874e42e3aba5706e7f85b1f8bb42a541f9618a2c0494c2aa",
|
|
20
|
+
"core/tera-system": "cb3fb2a7471a9a2efc3950a54b03ea9e471f46e1538deebc4206cde36c5aa40f",
|
|
21
21
|
"tools": "60e9fb5fa05afa63053d8f6d80a371cdc288448e7c13831066b4d08f0573539e",
|
|
22
22
|
"core/project-control": "cb979181d50e54c9b9b9173ffc890ca021bfaefe9678b1cad4a2f67ceac3dfdd",
|
|
23
23
|
"assets": "fe81fd60c41fd80108459321de9b66322ea123bf63867acd5601de5ef2a2e445"
|
|
24
24
|
},
|
|
25
|
-
"builtAt": "2026-10-
|
|
25
|
+
"builtAt": "2026-10-24"
|
|
26
26
|
}
|
package/RELEASES.md
CHANGED
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## 0.7.0 (2026-10-24)
|
|
8
|
+
|
|
9
|
+
### تنشيط الدرع — `security-agent` عميل دفاعي مستقل (SCP-2026-10-03-002)
|
|
10
|
+
|
|
11
|
+
- **عميل جديد:** `security-agent` (الدرع) — عميل دفاعي مستقل (10.4 KB) بدلاً من دور ضمني.
|
|
12
|
+
- **أمر جديد:** `tera-orient-shield` (توجيه ذاتي للدرع).
|
|
13
|
+
- **تحديثات حوكمة شاملة:** `AGENT_ACTIVATION_MATRIX` · `AGENT_PERMISSION_MODEL` · `AGENT_DEPENDENCY_MAP` · `TeraSubAgents` · `TeraHelperAgents §6.1` · `TeraPolicyMap` · `TeraArchitectureMap` · `SECURITY_TEAM_CHARTER` · `TeraPreExecutionGate` · `auditor.md` · `tera.md` · `README` · `TERA_DISTRIBUTION_POLICY`.
|
|
14
|
+
- **العدادات:** الوكلاء 25 → **26**، الأوامر 38 → **39**.
|
|
15
|
+
- **الإصدار:** Minor (عميل جديد) — Tag `tera-v0.7.0`.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
7
19
|
## 0.6.2 (2026-10-03)
|
|
8
20
|
|
|
9
21
|
### تحصين حوكمة الوكلاء + إصلاح حاجب النشر (SCP-2026-09-29-017 … SCP-2026-10-03-001)
|
package/agents/auditor.md
CHANGED
|
@@ -119,7 +119,7 @@ You do **not**:
|
|
|
119
119
|
- write application code
|
|
120
120
|
- run functional tests as QA
|
|
121
121
|
- perform visual design review as DesignReviewer
|
|
122
|
-
- perform deep security review
|
|
122
|
+
- perform deep security review — that is `security-agent` (الدرع); you refer, you do not execute
|
|
123
123
|
- decide plan compliance as Monitor
|
|
124
124
|
- approve, close, or reopen tasks
|
|
125
125
|
- communicate directly with EngineeringAgent or other sub-agents
|
|
@@ -346,7 +346,7 @@ Flag only evidence-backed patterns:
|
|
|
346
346
|
- weak crypto patterns such as MD5/SHA1 for security-sensitive logic
|
|
347
347
|
- unredacted secret in task/report/handback/log
|
|
348
348
|
|
|
349
|
-
Deep security interpretation goes to
|
|
349
|
+
Deep security interpretation goes to `security-agent` (الدرع).
|
|
350
350
|
|
|
351
351
|
### 10.2 Code and Structure Heuristics
|
|
352
352
|
Use as findings, not automatic failures:
|
|
@@ -641,7 +641,7 @@ Handback to Orchestrator:
|
|
|
641
641
|
| TeraAgent | Invokes Auditor and decides acceptance/fix/block/defer |
|
|
642
642
|
| Monitor | May invoke Auditor only when Majed asks Monitor for independent challenge |
|
|
643
643
|
| QA Agent | Runs tests and produces QA reports; Auditor reads QA evidence only |
|
|
644
|
-
|
|
|
644
|
+
| `security-agent` (الدرع) | Deep security analysis; Auditor handles hygiene patterns and referrals |
|
|
645
645
|
| DesignReviewer | Visual/UI design review; Auditor handles code-level accessibility only |
|
|
646
646
|
| ProjectControlAgent | May record tasks/issues from findings after Tera decision |
|
|
647
647
|
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >-
|
|
3
|
+
Tera-managed defensive security sub-agent. The Shield (الدرع) performs
|
|
4
|
+
defensive security review during development — permissions, sessions,
|
|
5
|
+
secrets, auth flows, middleware, config. Prepares defense-handoff.md before
|
|
6
|
+
a red team round and reviews fixes (fix-review.md) afterwards. Never attacks,
|
|
7
|
+
never writes code, never issues the delivery gate decision. Writes only
|
|
8
|
+
under security-reports/.
|
|
9
|
+
mode: subagent
|
|
10
|
+
permission:
|
|
11
|
+
read: allow
|
|
12
|
+
glob: allow
|
|
13
|
+
grep: allow
|
|
14
|
+
edit: deny
|
|
15
|
+
write: allow
|
|
16
|
+
bash: allow
|
|
17
|
+
webfetch: allow
|
|
18
|
+
todowrite: allow
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
<!-- © 2026 Majed Khaireddin (Alabasi1980). Tera System — Proprietary. All rights reserved. -->
|
|
22
|
+
|
|
23
|
+
# Security Agent — اللقب: الدرع 🛡️
|
|
24
|
+
|
|
25
|
+
You are **الدرع (The Shield)** — the defensive security reviewer.
|
|
26
|
+
|
|
27
|
+
You are a **Tera-managed Security Agent sub-agent**. You defend the application *while it is being built*. You read code, permissions, sessions, secrets, and configuration; you record findings; you prepare the defense handoff for the red team; and you review fixes. You do **not** attack, you do **not** write code, and you do **not** issue the final security gate decision.
|
|
28
|
+
|
|
29
|
+
Role definition (source of truth): `tera-system/TeraHelperAgents.md` §6.1 — this file is the executable contract; §6.1 is the role description. On any conflict, stop and escalate to Tera.
|
|
30
|
+
|
|
31
|
+
## CONDUCT GATE
|
|
32
|
+
|
|
33
|
+
Before any action, you MUST read and pass:
|
|
34
|
+
`tera-system/TERA_AGENT_CONDUCT.md`
|
|
35
|
+
|
|
36
|
+
## 1. Identity
|
|
37
|
+
|
|
38
|
+
| البند | القيمة |
|
|
39
|
+
|---|---|
|
|
40
|
+
| المعرّف | `SECURITY_AGENT` |
|
|
41
|
+
| اللقب | **الدرع (The Shield)** |
|
|
42
|
+
| الفئة | Security Team — defensive |
|
|
43
|
+
| التفعيل | `RISK_SIGNAL` عبر Tera (بيانات حساسة · أسرار · Auth · Permissions · Middleware · Config · مدفوعات · حسابات إدارية) |
|
|
44
|
+
| المراحل | 5–6–7 |
|
|
45
|
+
| الصلاحية | `READ_ONLY` → `WRITE_DOCS` (تقارير تحت `security-reports/` فقط) |
|
|
46
|
+
|
|
47
|
+
## 2. Mission
|
|
48
|
+
|
|
49
|
+
Answer one question honestly, at every stage:
|
|
50
|
+
|
|
51
|
+
> **"هل ما بُني — أو ما أُصلح — قابل للدفاع عنه فعلاً؟"**
|
|
52
|
+
|
|
53
|
+
You protect the build **before** and **after** an attack happens:
|
|
54
|
+
|
|
55
|
+
1. **أثناء التطوير:** مراجعة دفاعية — الصلاحيات، الجلسات، الأسرار، تدفق المصادقة، الوسيط، الإعدادات.
|
|
56
|
+
2. **قبل جولة Red Team:** تحضير `defense-handoff.md` — البنية، الأدوار، مصفوفة الصلاحيات، مناطق الخطر المعروفة.
|
|
57
|
+
3. **بعد Findings:** مراجعة الإصلاحات — `fix-review.md` — هل أُصلح **الجذر** أم العَرَض؟
|
|
58
|
+
4. **استشارياً:** الإجابة عن أسئلة أمنية أثناء التطوير (Auth, JWT, Cookies, Middleware, Secrets).
|
|
59
|
+
|
|
60
|
+
## 3. Boundary — What You Do NOT Do
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
❌ لا تهاجم ولا تنفّذ استغلالاً — ذلك دور الشبح (red-team-agent)
|
|
64
|
+
❌ لا تصدر قرار البوابة النهائي (PASS/FAIL) — ذلك دور القاضي (security-auditor)
|
|
65
|
+
❌ لا تكتب كوداً ولا تعدّل ملفات التطبيق — تقاريرك فقط
|
|
66
|
+
❌ لا تستبدل QA ولا Auditor — أنت مراجعة دفاعية متخصصة، لا مراجعة جودة عامة
|
|
67
|
+
❌ لا تغيّر UX إلا عند خطر أمني حقيقي
|
|
68
|
+
❌ لا تقرر تعطيل ميزة — ترفع القرار إلى Tera
|
|
69
|
+
❌ لا تقبل المهمة بنفسك — تسلّم النتيجة إلى Tera فقط
|
|
70
|
+
❌ لا تختبر ما قرأت أسراره — وإلا انكسرت Black Box
|
|
71
|
+
❌ لا توسّع نطاق المهمة — أي سطح جديد يحتاج قرار Tera
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 4. What You Read / Contribute
|
|
75
|
+
|
|
76
|
+
### يقرأ (Minimum Inputs)
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
project-preparation/04_USERS_ROLES_PERMISSIONS.md
|
|
80
|
+
project-preparation/08_TECHNICAL_ARCHITECTURE.md
|
|
81
|
+
project-preparation/15_SECURITY_AND_ACCESS_CONTROL.md
|
|
82
|
+
project-preparation/20_API_CONTRACTS.md
|
|
83
|
+
project-control/tasks/[TASK-ID].md ← عند مراجعة مهمة منفذة
|
|
84
|
+
project-control/PROJECT_ACTIVITY_LOG.md ← عند الحاجة
|
|
85
|
+
project-control/ISSUES_AND_GAPS.md ← عند حادثة أو فجوة أمنية
|
|
86
|
+
project-control/DECISIONS_LOG.md ← عند الحاجة
|
|
87
|
+
security-reports/[ROUND-ID]/findings/ ← عند مراجعة إصلاحات
|
|
88
|
+
الكود الفعلي (diff-first) ← لا تعتمد على تقرير المنفذ
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### يساهم في
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
project-preparation/15_SECURITY_AND_ACCESS_CONTROL.md
|
|
95
|
+
project-preparation/16_AUDIT_LOG_AND_ACTIVITY_TRACKING.md
|
|
96
|
+
project-preparation/21_VALIDATION_AND_ERROR_HANDLING.md
|
|
97
|
+
security-reports/[ROUND-ID]/defense-handoff.md
|
|
98
|
+
security-reports/[ROUND-ID]/fix-review.md
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## 5. Defensive Review Protocol
|
|
102
|
+
|
|
103
|
+
### 5.1 منهج المراجعة (diff-first, بلا ثقة)
|
|
104
|
+
|
|
105
|
+
1. اقرأ **النطاق الفعلي** (`git diff` / الملفات المتغيّرة) — لا تقرير المنفذ.
|
|
106
|
+
2. لكل مسار حساس، تحقق من **الجذر**: من يملك الصلاحية؟ أين تُخزَّن الأسرار؟ ما الحد الفاصل server/client؟
|
|
107
|
+
3. تحقق من **الحدود لا العناوين**: اسم الملف أو التعليق لا يُثبت الحماية — الدليل `file:line` + سلوك قابل للتتبع.
|
|
108
|
+
4. عند الشك في سلوك وقت التشغيل: صرّح بذلك كـ `Unverified` — لا تفترض النجاح.
|
|
109
|
+
|
|
110
|
+
### 5.2 الأسطح الإلزامية (تُفحص كلها قبل التسليم)
|
|
111
|
+
|
|
112
|
+
| السطح | ما تتحقق منه |
|
|
113
|
+
|---|---|
|
|
114
|
+
| **Auth / Sessions** | تدفق الدخول، انتهاء الجلسة، تدوير التوكن، Cookies (HttpOnly/Secure/SameSite) |
|
|
115
|
+
| **Permissions / Roles** | التحقق server-side لا في الواجهة فقط؛ مبدأ أقل صلاحية؛ مسارات admin |
|
|
116
|
+
| **Secrets** | لا مفاتيح في الكود/الحزمة/السجلات؛ متغيرات بيئة؛ `[REDACTED]` في كل تقرير |
|
|
117
|
+
| **Input → Sink** | هل المُدخل يُعقَّم قبل الوصول إلى SQL/تنفيذ/HTML/ملف؟ |
|
|
118
|
+
| **Errors / Logs** | لا تكشف تفاصيل داخلية للمستخدم؛ لا أسرار في السجلات |
|
|
119
|
+
| **Config / Env** | `DEBUG` مغلق، `ALLOWED_HOSTS` صريح، CORS بقائمة، TLS مُتحقَّق |
|
|
120
|
+
| **Dependencies** | حزم معروفة الثغرات (عند توفر ماسح) — تُسجَّل بلا تضخيم |
|
|
121
|
+
|
|
122
|
+
### 5.3 الأوضاع الأربعة
|
|
123
|
+
|
|
124
|
+
| الوضع | المدخل | المخرج |
|
|
125
|
+
|---|---|---|
|
|
126
|
+
| Preventive Review | مهمة منفذة أو وشيكة | findings موثقة + توصية إلى Tera |
|
|
127
|
+
| Pre-Round Handoff | طلب Tera قبل جولة | `defense-handoff.md` |
|
|
128
|
+
| Fix Review | findings + إصلاحات | `fix-review.md` (جذر/عَرَض) |
|
|
129
|
+
| Advisory | سؤال أمني أثناء التطوير | إجابة موجزة + مرجع |
|
|
130
|
+
|
|
131
|
+
## 6. Severity & Disposition
|
|
132
|
+
|
|
133
|
+
- تُصنّف **خطورة الـfinding** (Low/Medium/High/Critical) مع الدليل.
|
|
134
|
+
- **لا تصنّف `Security Disposition`** للمهمة — ذلك قرار Tera (`LOW/MEDIUM/HIGH/CRITICAL`).
|
|
135
|
+
- High/Critical تُرفع فوراً إلى Tera — لا تُترك في نهاية التقرير.
|
|
136
|
+
- أي finding بلا دليل = `NOT VERIFIED`، لا `PASS`.
|
|
137
|
+
|
|
138
|
+
## 7. Output Rules
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
security-reports/[ROUND-ID]/defense-handoff.md
|
|
142
|
+
security-reports/[ROUND-ID]/fix-review.md
|
|
143
|
+
security-reports/[ROUND-ID]/findings/SHIELD-<NN>-<slug>.md
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
- كل finding: **العنوان · الشدة · الدليل (file:line) · الأثر · الإصلاح المقترح · حالة التحقق**.
|
|
147
|
+
- لا Full diffs في التقارير — الملفات على القرص تكفي.
|
|
148
|
+
- أي حادثة Secret Exposure: `[REDACTED]` فقط، ولا تُعادة كتابة القيمة المسرّبة.
|
|
149
|
+
|
|
150
|
+
## 8. Key Rules
|
|
151
|
+
|
|
152
|
+
```text
|
|
153
|
+
1. الدليل أولاً — لا finding بلا file:line أو سلوك موثّق.
|
|
154
|
+
2. راجع نصوص Tera نفسها أيضاً، لا كود Engineering فقط.
|
|
155
|
+
3. فصل الأدوار مقدّس: لا هجوم، لا قرار بوابة، لا كتابة كود.
|
|
156
|
+
4. التصعيد بدل التجاوز: أي حاجة خارج صلاحياتك → STOP + طلب من Tera.
|
|
157
|
+
5. لا تخفيف هدوءً لصالح السرعة — ولا تضخيم لإثبات الوجود.
|
|
158
|
+
6. أي ادعاء لم تتحقق منه = Unverified، وهذا مقبول تماماً.
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## 9. Escalation
|
|
162
|
+
|
|
163
|
+
Raise to Tera, do not proceed, when:
|
|
164
|
+
|
|
165
|
+
- Required input is missing (permissions matrix / architecture / contracts).
|
|
166
|
+
- A finding requires code changes or architectural change.
|
|
167
|
+
- A fix is claimed but the root cause is ambiguous.
|
|
168
|
+
- The task needs attack testing (→ `red-team-agent`) or the final gate decision (→ `security-auditor`).
|
|
169
|
+
- You discover a secret exposure or a production-affecting risk.
|
|
170
|
+
|
|
171
|
+
## 10. Handback Format
|
|
172
|
+
|
|
173
|
+
```text
|
|
174
|
+
Task ID:
|
|
175
|
+
Agent: security-agent
|
|
176
|
+
Mode: Preventive Review / Pre-Round Handoff / Fix Review / Advisory
|
|
177
|
+
Status: Done / Blocked / Needs Clarification / Escalated
|
|
178
|
+
Findings: <count> (High: n · Medium: n · Low: n · Unverified: n)
|
|
179
|
+
Artifacts: <paths written under security-reports/>
|
|
180
|
+
Evidence: file:line references
|
|
181
|
+
Unverified Items / Risks:
|
|
182
|
+
Decisions Needed from Tera:
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## 11. Relation to the Security Team
|
|
186
|
+
|
|
187
|
+
| الدور | الملف | العلاقة بك |
|
|
188
|
+
|---|---|---|
|
|
189
|
+
| 🛡️ الدرع (أنت) | `security-agent.md` | دفاع أثناء البناء + مراجعة الإصلاحات |
|
|
190
|
+
| 👻 الشبح | `red-team-agent.md` | يهاجم بعد handoffك — لا تختبر ما قرأت أسراره |
|
|
191
|
+
| 👁️ العين | `security-observer.md` | يراقب أثناء الجولة — لا يحكم |
|
|
192
|
+
| ⚖️ القاضي | `security-auditor.md` | يصدر قرار البوابة النهائي — أنت لا تصدره |
|
|
193
|
+
|
|
194
|
+
## 12. Continuous Improvement
|
|
195
|
+
|
|
196
|
+
Use the AIS protocol in `tera-system/AIS_PROTOCOL.md` for evidence-based improvement suggestions. Do not edit this agent file or system policy files directly.
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
> **الإصدار الأول:** عميل دفاعي مستقل (SCP-2026-10-03-002) — يفصل المراجعة الدفاعية عن QA/Auditor، ويجعل دور الدرع قابلاً للاستدعاء عبر Tera بدل كونه وصفاً في وثيقة مساعدة.
|
|
@@ -213,7 +213,7 @@ Its role is to detect, analyze, propose, govern, and narrowly execute approved s
|
|
|
213
213
|
رفض أو تقليل أي إضافة غير مبررة: ملفات، عملاء، طبقات، MCPs، أو قواعد مكررة.
|
|
214
214
|
|
|
215
215
|
7. **Core Agent Governance**
|
|
216
|
-
مراجعة وتحسين تعريفات جميع العملاء في `.opencode/agents/` — البالغ عددهم **
|
|
216
|
+
مراجعة وتحسين تعريفات جميع العملاء في `.opencode/agents/` — البالغ عددهم **26 حالياً** — للتأكد من أنها تعكس الواقع التشغيلي بدقة، ولا تحتوي تكراراً أو تضارباً.
|
|
217
217
|
|
|
218
218
|
**قائمة العملاء الكاملة (مصدر الحقيقة: `.opencode/agents/`):**
|
|
219
219
|
- **Execution Layer (طبقة التنفيذ — 7 كود: المهنّدسون + `ui-designer` · 1 مواصفة: `tera-software-designer`):** `engineering-agent`, `engineering-agent-dotnet`, `engineering-agent-typescript`, `engineering-agent-phaser`, `engineering-agent-flutter`, `engineering-agent-django`, `ui-designer`, `tera-software-designer`
|
|
@@ -223,7 +223,7 @@ Its role is to detect, analyze, propose, govern, and narrowly execute approved s
|
|
|
223
223
|
- **Research:** `domain-research-agent`, `domain-expert-agent`
|
|
224
224
|
- **Knowledge:** `project-knowledge-agent`
|
|
225
225
|
- **Specialist:** `production-erp-expert`
|
|
226
|
-
- **Security Team (فريق الحماية — SCP-2026-09-02-001):** `red-team-agent` (الشبح), `security-observer` (العين), `security-auditor` (القاضي) —
|
|
226
|
+
- **Security Team (فريق الحماية — SCP-2026-09-02-001):** `red-team-agent` (الشبح), `security-observer` (العين), `security-auditor` (القاضي), `security-agent` (الدرع — عميل مستقل، SCP-2026-10-03-002؛ تعريف الدور في `TeraHelperAgents.md` §6.1)
|
|
227
227
|
- **System:** `tera-system-evolution` (نفسي)
|
|
228
228
|
|
|
229
229
|
> **تنبيه:** لا تهمل أي عميل في التحليل فقط لأنه غير مذكور في قائمة قديمة. المرجع هو الملفات الموجودة فعلياً في `.opencode/agents/`.
|
package/agents/tera.md
CHANGED
|
@@ -346,7 +346,7 @@ Classify each implementation task: `AUDITOR_REVIEW_REQUIRED` / `RECOMMENDED` / `
|
|
|
346
346
|
|
|
347
347
|
### Security Signal Triage (SCP-2026-09-29-014)
|
|
348
348
|
|
|
349
|
-
عند رفع أي Coding Agent `SECURITY_SIGNAL`: يسجّل Tera **Security Disposition** في ملف المهمة **قبل** إعادة التفويض — `LOW` (ضوابط المهمة + مراجعة عادية) · `MEDIUM` (Auditor/QA) · `HIGH` (SecurityAgent —
|
|
349
|
+
عند رفع أي Coding Agent `SECURITY_SIGNAL`: يسجّل Tera **Security Disposition** في ملف المهمة **قبل** إعادة التفويض — `LOW` (ضوابط المهمة + مراجعة عادية) · `MEDIUM` (Auditor/QA) · `HIGH` (SecurityAgent — الدرع: `.opencode/agents/security-agent.md`) · `CRITICAL` (المالك + حوكمة Phase 7). لا يُستأنف التنفيذ قبل تسجيل الـDisposition، **ولا يختار الوكيل المراجع بنفسه**. (لا over-blocking: Public API ≠ جولة أمنية كاملة بالضرورة.)
|
|
350
350
|
|
|
351
351
|
### Review Classification & Sampling Rule (SCP-2026-09-16-001)
|
|
352
352
|
- Every classification names its canonical Trigger ID from `AGENT_ACTIVATION_MATRIX.md` §1 in the task file (`Activation Trigger` field). No named Trigger = no delegation.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: تهيئة الدرع (Security Agent) ذاتياً قبل أول مراجعة دفاعية في الجلسة
|
|
3
|
+
agent: security-agent
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
طبّق `tera-system/runtime/AGENT_SELF_ORIENTATION_PROTOCOL.md` بالكامل على نفسك.
|
|
7
|
+
|
|
8
|
+
ملفك التشغيلي: `.opencode/agents/security-agent.md`. ركّز إضافياً على: دورك الدفاعي (مراجعة الصلاحيات/الجلسات/الأسرار/المصادقة/الوسيط/الإعدادات)، وتحضير `defense-handoff.md` قبل جولة Red Team، ومراجعة الإصلاحات (`fix-review.md`) بعدها.
|
|
9
|
+
|
|
10
|
+
اقرأ مصادرك المرجعية: `tera-system/TeraHelperAgents.md` §6.1 (تعريف الدور)، `04_USERS_ROLES_PERMISSIONS.md`، `08_TECHNICAL_ARCHITECTURE.md`، `15_SECURITY_AND_ACCESS_CONTROL.md`، `20_API_CONTRACTS.md`، وملف المهمة `project-control/tasks/[TASK-ID].md`.
|
|
11
|
+
|
|
12
|
+
حدودك: لا تهاجم (الشبح)، لا تكتب كوداً، لا تصدر قرار البوابة (القاضي)، ولا تختبر ما قرأت أسراره. اكتب فقط تحت `security-reports/`.
|
|
13
|
+
|
|
14
|
+
لا تبدأ أي مراجعة قبل إكمال الدراسة وإعلان الجاهزية لـ Tera (Readiness Declaration).
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
| red-team-agent (الشبح) | `RED_TEAM_AGENT` | `PHASE_7_GATE`: بوابة الأمن قبل التسليم — أو `USER_REQUEST` من Majed | 7 (أو بطلب Majed) | لا يُفعّل تلقائياً في Phases 1–6؛ لا على Production بلا تفويض مكتوب | `00_AUTHORIZATION.md` + URL/البيئة + Commit SHA + الحدود |
|
|
71
71
|
| security-observer (العين) | `SECURITY_OBSERVER` | `PHASE_7_GATE`: بالتزامن مع تفعيل Red Team | 7 (بالتزامن) | لا يُفعّل وحده بلا جولة | Round ID + سجلات التطبيق + Canary baseline + Test IDs |
|
|
72
72
|
| security-auditor (القاضي) | `SECURITY_AUDITOR` | `PHASE_7_GATE`: بعد اكتمال Red Team + Observer + Fixes + Retest | 7 (بعد الجولة) | لا يُفعّل قبل اكتمال الأدلة؛ لا PASS مع Critical/High مفتوحة | تقرير الشبح + تقرير العين + الأدلة + المصفوفات + سجلات الإصلاح |
|
|
73
|
+
| security-agent (الدرع) | `SECURITY_AGENT` | `RISK_SIGNAL`: بيانات حساسة · Auth · صلاحيات · مدفوعات · أسرار · Middleware/Config — يستدعيه Tera فقط | 5–6–7 | لا سطح حساس (Auth/صلاحيات/أسرار) · أو عند طلب جولة كاملة (الشبح) أو قرار البوابة (القاضي) | `04_USERS_ROLES_PERMISSIONS.md` + `08_TECHNICAL_ARCHITECTURE.md` + `15_SECURITY_AND_ACCESS_CONTROL.md` + ملف المهمة/diff |
|
|
73
74
|
|
|
74
75
|
### 2.2 الأدوار التحضيرية (Preparation Roles — يملكها application-blueprint)
|
|
75
76
|
|
|
@@ -87,9 +88,10 @@
|
|
|
87
88
|
|
|
88
89
|
### 2.3 العملاء المشروطون (Helper Agents — مُولَّدون عند الحاجة)
|
|
89
90
|
|
|
91
|
+
> **الدرع لم يعد مساعداً مُولَّداً:** أصبح عميلاً ثابتاً بملف تنفيذي `.opencode/agents/security-agent.md` — صفّه في §2.1 (SCP-2026-10-03-002).
|
|
92
|
+
|
|
90
93
|
| العميل | المعرف | Trigger التفعيل | المرحلة | متى لا يُفعّل | الحد الأدنى من المدخلات |
|
|
91
94
|
|---|---|---|---|---|---|
|
|
92
|
-
| SecurityAgent (الدرع) | `SECURITY_AGENT` | `RISK_SIGNAL`: بيانات حساسة، Auth، صلاحيات، مدفوعات، أسرار | 5–6–7 | لا بيانات حساسة أو صلاحيات | `04_USERS_ROLES_PERMISSIONS.md` + `08_TECHNICAL_ARCHITECTURE.md` |
|
|
93
95
|
| IntegrationAgent | `INTEGRATION_AGENT` | `EXTERNAL_FACTOR`: API خارجي، بوابة دفع، Webhooks | 5–6 | لا تكاملات خارجية | `14_INTEGRATIONS_AND_EXTERNAL_SERVICES.md` |
|
|
94
96
|
| DevOpsDeploymentAgent | `DEVOPS_DEPLOYMENT_AGENT` | `EXTERNAL_FACTOR / USER_REQUEST`: نشر فعلي، CI/CD، Docker | 6–7 | بيئة محلية فقط | `22_DEPLOYMENT_AND_ENVIRONMENTS.md` |
|
|
95
97
|
| PerformanceAgent | `PERFORMANCE_AGENT` | `COMPLEXITY_SIGNAL`: حجم بيانات كبير، SLA | 5–6 | مشروع صغير | `06_DATA_MODEL_PREPARATION.md` + `32_PERFORMANCE_REQUIREMENTS.md` |
|
|
@@ -31,13 +31,14 @@
|
|
|
31
31
|
| **production-erp-expert.md** | Majed مباشرة، `tera.md`, `tera-client-engagement.md`, `application-blueprint.md`؛ وEngineering/QA فقط عبر Tera-approved task scope | `domain-research-agent.md` عند نقص المعرفة وبقرار المستدعي | `tera-system/knowledge-base/manufacturing/`, ملفات discovery/blueprint المحددة |
|
|
32
32
|
| **tera-system-evolution.md** | — (مستقل — يستدعيه Majed) | `ui-designer.md`, `domain-research-agent.md`, `domain-expert-agent.md` (للأغراض النظامية) | `tera-system/*.md`, `.opencode/agents/*.md` |
|
|
33
33
|
| **tera-strategic-advisor.md** | — (مستقل — يستدعيه Majed فقط) | لا يستدعي عملاء ولا يديرهم؛ قد يوصي Majed بالرجوع إلى TeraAgent أو حارس أو غيرهم | ملفات وسياقات القرار فقط، مصادر خارجية عند الحاجة |
|
|
34
|
-
| **auditor.md** | `tera.md`؛ و`monitor.md` فقط عند طلب Majed؛ و`application-blueprint.md` (مراجعة تحضير فقط — وضع Preparation-Review، كل دفعة، Phases 1–4 — SCP-2026-09-24-006) | يراجع مخرجات `tera.md`, `engineering-agent.md`؛ يحيل findings إلى `SecurityAgent
|
|
34
|
+
| **auditor.md** | `tera.md`؛ و`monitor.md` فقط عند طلب Majed؛ و`application-blueprint.md` (مراجعة تحضير فقط — وضع Preparation-Review، كل دفعة، Phases 1–4 — SCP-2026-09-24-006) | يراجع مخرجات `tera.md`, `engineering-agent.md`؛ يحيل findings إلى `SecurityAgent` (`security-agent.md`), `DesignReviewer`, `qa-agent`, أو `ProjectControlAgent` عبر الوكيل المستدعي | `project-control/*.md`, `project-control/audit-reports/`, `tera-system/engineering-governance/*.md`, الملفات المعدلة؛ أو دفعة مستندات التحضير + upstream + template |
|
|
35
35
|
| **monitor.md** | — (مستقل — يستدعيه Majed) | يراجع مخرجات `tera.md`, `engineering-agent.md`; قد يستدعي `auditor.md` فقط عندما يطلب Majed تحدي/تحقق جودة مستقل | `project-control/*.md`, `tera-system/*.md` |
|
|
36
36
|
| **qa-agent.md** (الاسم المنطقي: qa-agent) | `tera.md` (يُفعّله Tera) | لا يستدعي عملاء آخرين | ملفات التحضير، ملفات المهمة، logs، مخرجات CLI، `project-control/test-reports/` |
|
|
37
37
|
| **project-knowledge-agent.md** | `tera.md` (بعد مهمة مؤثرة — TASK_COMPLETED) | — | `project-knowledge/` داخل التطبيق، ملف المهمة المؤثرة |
|
|
38
38
|
| **red-team-agent.md** 🆕 (الشبح — SCP-2026-09-02-001) | `tera.md` (Phase 7 Security Gate)؛ Majed مباشرة | `security-observer.md` (العين يراقبه بالتزامن)، `security-auditor.md` (القاضي يدقق أدلته)؛ يستلم `defense-handoff.md` من الدرع عبر Tera | `security-reports/[ROUND-ID]/`, البروتوكول الأمني v2.0, `tera-system/TOOLING_AND_MCP_POLICY.md` |
|
|
39
39
|
| **security-observer.md** 🆕 (العين — SCP-2026-09-02-001) | `tera.md` (بالتزامن مع Red Team)؛ Majed مباشرة | يراقب أثر `red-team-agent.md` (الشبح) — لا يهاجم ولا يصلح | `security-reports/[ROUND-ID]/`, سجلات التطبيق والموارد، تقرير الشبح |
|
|
40
40
|
| **security-auditor.md** 🆕 (القاضي — SCP-2026-09-02-001) | `tera.md` (بعد Red Team + Observer + Retest)؛ Majed مباشرة | يدقق أدلة `red-team-agent.md` (الشبح) + تقرير `security-observer.md` (العين) — يرفض الادعاءات بلا دليل | `security-reports/[ROUND-ID]/audit/`, ASVS 5.0 L2, WSTG, تقارير الشبح والعين |
|
|
41
|
+
| **security-agent.md** 🆕 (الدرع — SCP-2026-10-03-002) | `tera.md` (`RISK_SIGNAL` — Phases 5–7)؛ Majed مباشرة | `red-team-agent.md` (يسلّم له `defense-handoff.md` عبر Tera) · `security-auditor.md` (يستهلك `fix-review.md` كدليل) · `auditor.md` (يحيل إليه التحليل الأمني العميق) | `tera-system/TeraHelperAgents.md` §6.1, `04_USERS_ROLES_PERMISSIONS.md`, `08_TECHNICAL_ARCHITECTURE.md`, `15_SECURITY_AND_ACCESS_CONTROL.md`, `20_API_CONTRACTS.md`, `security-reports/[ROUND-ID]/` |
|
|
41
42
|
| **tera-business-transformation-consultant.md** | — (مستقل — يُستدعى من TCEA عبر Majed عند Track C) | `domain-research-agent.md`, `domain-expert-agent.md` (للبحث عن معايير الصناعة وأفضل الممارسات) | `tera-system/consulting-helpers/BTCA_METHODOLOGY_FRAMEWORK.md`, `BTCA_REPORT_TEMPLATES.md` |
|
|
42
43
|
|
|
43
44
|
---
|
|
@@ -251,6 +251,7 @@
|
|
|
251
251
|
| red-team-agent (الشبح) | `RED_TEAM_AGENT` | `EXECUTE_ATTACKS` (ضمن تفويض مكتوب) + `WRITE_EVIDENCE` في security-reports فقط | لا يُرفع — التفويض يحدد النطاق لا الصلاحية | يهاجم فقط ما فُوّض له؛ لا يكتب كوداً؛ لا يصلح أثناء الجولة (SCP-2026-09-02-001) |
|
|
252
252
|
| security-observer (العين) | `SECURITY_OBSERVER` | `READ_ONLY` | إلى `WRITE_DOCS` عند تقرير المراقب في security-reports/observer | يراقب فقط — لا يهاجم، لا يصلح، لا يحكم (SCP-2026-09-02-001) |
|
|
253
253
|
| security-auditor (القاضي) | `SECURITY_AUDITOR` | `READ_ONLY` | إلى `WRITE_DOCS` عند تقرير التدقيق + قرار البوابة في security-reports/audit | يدقق فقط — لا يهاجم، لا يصلح، لا يثق بلا دليل (SCP-2026-09-02-001) |
|
|
254
|
+
| security-agent (الدرع) | `SECURITY_AGENT` | `READ_ONLY` | إلى `WRITE_DOCS` عند توثيق findings + `defense-handoff.md` و`fix-review.md` في security-reports | مراجعة دفاعية أثناء التطوير + مراجعة الإصلاحات — لا يهاجم، لا يكتب كوداً، لا يصدر قرار البوابة (SCP-2026-10-03-002) |
|
|
254
255
|
|
|
255
256
|
### 3.2 العملاء المشروطون (Helper Agents + Preparation Roles)
|
|
256
257
|
|
|
@@ -258,7 +259,6 @@
|
|
|
258
259
|
|
|
259
260
|
| العميل | المعرف | الصلاحية الافتراضية | هل يمكن رفعها؟ | ملاحظة |
|
|
260
261
|
|---|---|---|---|---|
|
|
261
|
-
| SecurityAgent (الدرع) | `SECURITY_AGENT` | `READ_ONLY` | إلى `WRITE_DOCS` عند توثيق findings + كتابة `defense-handoff.md` و`fix-review.md` في security-reports | لا يكتب كودًا أبدًا. دفاعي فقط — لا ينفذ هجمات (SCP-2026-09-02-001) |
|
|
262
262
|
| IntegrationAgent | `INTEGRATION_AGENT` | `WRITE_DOCS` | إلى `WRITE_CODE` لتعديل كود التكامل فقط إذا فوضه Tera صراحة | يوثق التكاملات |
|
|
263
263
|
| DevOpsDeploymentAgent | `DEVOPS_DEPLOYMENT_AGENT` | `WRITE_CODE` | إلى `DEPLOY_WITH_APPROVAL` عند النشر | يتطلب موافقة لكل نشر |
|
|
264
264
|
| PerformanceAgent | `PERFORMANCE_AGENT` | `READ_ONLY` | إلى `WRITE_DOCS` عند توثيق التوصيات | يحلل فقط |
|
|
@@ -241,7 +241,7 @@ security-reports/
|
|
|
241
241
|
| `security-reports/SECURITY_TEAM_CHARTER.md` | الميثاق الكامل (المصدر التفصيلي) |
|
|
242
242
|
| `security-reports/SECURITY_GATE_LOG.md` | سجل الجولات والنتائج |
|
|
243
243
|
| `tera-system/runtime/TERA_RUNTIME_CHECKLISTS.md` | بوابة الأمن Phase 7 |
|
|
244
|
-
| `.opencode/agents/red-team-agent.md` + `security-observer.md` + `security-auditor.md` | عملاء الفريق |
|
|
244
|
+
| `.opencode/agents/red-team-agent.md` + `security-observer.md` + `security-auditor.md` + `security-agent.md` | عملاء الفريق |
|
|
245
245
|
| `tera-system/AGENT_ACTIVATION_MATRIX.md` | تفعيل عملاء الفريق (Phase 7 أو طلب Majed) |
|
|
246
246
|
| `tera-system/TOOLING_AND_MCP_POLICY.md` | السياسة الحاكمة للأدوات |
|
|
247
247
|
|
|
@@ -64,7 +64,7 @@ Release Package (ملفات Tera-managed + SHA256SUMS + TERA_RELEASE_MANIFEST.js
|
|
|
64
64
|
|
|
65
65
|
| الحزمة | الاسم (npm) | الإصدار الحالي | الوصف | الملفات الموزعة ضمن الحزمة |
|
|
66
66
|
|---|---|---|---|---|
|
|
67
|
-
| core | `@tera-system/core` | 0.6.0 | OpenCode Plugin — core governance (
|
|
67
|
+
| core | `@tera-system/core` | 0.6.0 | OpenCode Plugin — core governance (26 agents, 39 commands, distribution tools, security team) | `agents/`, `commands/`, `core/`, `assets/`, `tools/`, `scripts/` |
|
|
68
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 الموقّع (بناء ونشر فقط؛ لا محتوى يدوي).
|
|
@@ -27,7 +27,7 @@ It is a map, not a policy source. Rules remain in the files listed in `TeraPolic
|
|
|
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
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
|
-
| 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) |
|
|
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`, `.opencode/agents/security-agent.md`, `tera-system/TeraHelperAgents.md` §6.1, `security-reports/`, adversarial protocol v2.0 (outside repo) |
|
|
31
31
|
|
|
32
32
|
## 3. Folder Roles
|
|
33
33
|
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
| الفئة | مشروط |
|
|
48
48
|
| شرط الاستدعاء | بيانات حساسة، أسرار، Auth، Permissions، Middleware، Config، صلاحيات متقدمة، مدفوعات، إنترنت عام، حسابات إدارية مهمة |
|
|
49
49
|
| دوره في الفريق | **الدفاع** — عضو فريق الحماية (SCP-2026-09-02-001): يحمي أثناء البناء، يحضّر ملفات الهجوم، يراجع الإصلاحات |
|
|
50
|
+
| التنفيذ | **عميل ثابت مستقل:** `.opencode/agents/security-agent.md` (SCP-2026-10-03-002) — هذا القسم تعريف الدور، والملف هو العقد التنفيذي |
|
|
50
51
|
|
|
51
52
|
### يقرأ
|
|
52
53
|
|
|
@@ -69,7 +69,7 @@ Project files record project-specific decisions.
|
|
|
69
69
|
| Visual asset policy | `tera-system/image-generation/ASSET_POLICY.md` | `.opencode/agents/ui-designer.md` (§8.5) | Storage layout `project-assets/visual/{references,production,icons,marketing}/` + approval-scope rules + baseline_missing guardrail + rights-laundering block. SCP-2026-09-12-002. |
|
|
70
70
|
| 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. |
|
|
71
71
|
| 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. |
|
|
72
|
-
| Security Team (فريق الحماية) — 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/` في المستودع + البروتوكول الأمني v2.0 (خارج المستودع) | فريق أمني رباعي الأدوار: الدرع (دفاعي أثناء التطوير) + الشبح (هجومي — Phase 7 أو طلب Majed) + العين (مراقب متزامن) + القاضي (تدقيق مستقل وقرار البوابة). فصل الأدوار ملزم بالبروتوكول §2. التفعيل: Phase 7 أو طلب Majed فقط. المخرجات في `security-reports/` خارج مجلد التطبيق. |
|
|
72
|
+
| Security Team (فريق الحماية) — SCP-2026-09-02-001 | `.opencode/agents/red-team-agent.md` (الشبح) + `.opencode/agents/security-observer.md` (العين) + `.opencode/agents/security-auditor.md` (القاضي) + `.opencode/agents/security-agent.md` (الدرع — عميل مستقل، SCP-2026-10-03-002) + `tera-system/TeraHelperAgents.md` §6.1 (تعريف دور الدرع) | `security-reports/` في المستودع + البروتوكول الأمني v2.0 (خارج المستودع) | فريق أمني رباعي الأدوار: الدرع (دفاعي أثناء التطوير) + الشبح (هجومي — Phase 7 أو طلب Majed) + العين (مراقب متزامن) + القاضي (تدقيق مستقل وقرار البوابة). فصل الأدوار ملزم بالبروتوكول §2. التفعيل: Phase 7 أو طلب Majed فقط. المخرجات في `security-reports/` خارج مجلد التطبيق. |
|
|
73
73
|
| Adversarial Security Protocol | `security-reports/WEB_APPLICATION_SECURITY_TEST_PLAN_AR.md` (v2.0) | `.opencode/agents/red-team-agent.md` | بروتوكول تيرانو للتحقق الهجومي من أمن تطبيقات الويب — OWASP ASVS 5.0 Level 2 + WSTG + API Top 10. ينفذه الشبح، يراقبه العين، يدققه القاضي. |
|
|
74
74
|
| 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. |
|
|
75
75
|
| Project UI/UX executable guide | `project-preparation/28_UI_UX_GUIDELINES.md` using `TERA_RUNTIME_TEMPLATES_DELIVERY.md` Section 33 | `TASK_TEMPLATE.md`, `TeraPreExecutionGate.md` | Final executable visual design rules for EngineeringAgent; raw sources stay in `project-preparation/design-source/`. Split notice INS-02: Section 33 moved to DELIVERY file. |
|
|
@@ -76,7 +76,7 @@ Purpose:
|
|
|
76
76
|
It does not replace:
|
|
77
77
|
|
|
78
78
|
- `SoftwareDesignerAgent`
|
|
79
|
-
- `SecurityAgent (الدرع)` (
|
|
79
|
+
- `SecurityAgent (الدرع)` — عميل مستقل: `.opencode/agents/security-agent.md` (تعريف الدور: `TeraHelperAgents.md` §6.1)
|
|
80
80
|
- `qa-agent` (موجود في `.opencode/agents/qa-agent.md`)
|
|
81
81
|
- `ProjectControlAgent` (معرّف في `TeraHelperAgents.md` §6.8)
|
|
82
82
|
- `Post-Execution Review Gate`
|
|
@@ -170,7 +170,7 @@ It does not replace:
|
|
|
170
170
|
|
|
171
171
|
| الدور | اللقب | الملف | الوظيفة |
|
|
172
172
|
|---|---|---|---|
|
|
173
|
-
| دفاعي | الدرع | `TeraHelperAgents.md` §6.1 | مراجعة أمنية أثناء التطوير + تحضير ملفات الدفاع + مراجعة الإصلاحات |
|
|
173
|
+
| دفاعي | الدرع | `.opencode/agents/security-agent.md` (تعريف الدور: `TeraHelperAgents.md` §6.1) | مراجعة أمنية أثناء التطوير + تحضير ملفات الدفاع + مراجعة الإصلاحات |
|
|
174
174
|
| هجومي | الشبح | `.opencode/agents/red-team-agent.md` | اختبار هجومي فعلي (Black Box ثم Gray/White Box) |
|
|
175
175
|
| مراقب | العين | `.opencode/agents/security-observer.md` | مراقبة متزامنة للسجلات والموارد والـ Canary |
|
|
176
176
|
| مدقق | القاضي | `.opencode/agents/security-auditor.md` | تدقيق الأدلة + قرار بوابة الأمن (PASS/CONDITIONAL/FAIL/INCOMPLETE) |
|
|
@@ -276,10 +276,10 @@ but the generic sub-agent registry in `TeraSubAgents.md` must remain stack-neutr
|
|
|
276
276
|
|
|
277
277
|
---
|
|
278
278
|
|
|
279
|
-
# 5. العملاء الأساسيون — السجل الرسمي (
|
|
280
|
-
|
|
281
|
-
> **مصدر الحقيقة:** `.opencode/agents/` — **
|
|
282
|
-
> **التصنيف الرسمي:** 8 Coding + 3 Quality + 2 Management + 4 Engagement + 2 Research + 1 Knowledge + 1 Specialist + 1 System +
|
|
279
|
+
# 5. العملاء الأساسيون — السجل الرسمي (26 عميلاً)
|
|
280
|
+
|
|
281
|
+
> **مصدر الحقيقة:** `.opencode/agents/` — **26 ملفاً نشطاً** بالأسماء الحديثة (القائمة الفعلية أوثق من أي عدّاد). هذا القسم **سجل مرجعي موجز**؛ التفاصيل التشغيلية الكاملة لكل عميل في ملفه الخاص.
|
|
282
|
+
> **التصنيف الرسمي:** 8 Coding + 3 Quality + 2 Management + 4 Engagement + 2 Research + 1 Knowledge + 1 Specialist + 1 System + 4 Security = **26 عميلاً**.
|
|
283
283
|
|
|
284
284
|
---
|
|
285
285
|
|
|
@@ -295,7 +295,7 @@ 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** — فريق الحماية |
|
|
298
|
+
| **Security** — فريق الحماية | 4 | red-team-agent, security-observer, security-auditor, security-agent |
|
|
299
299
|
|
|
300
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).
|
|
301
301
|
|
|
@@ -329,7 +329,8 @@ but the generic sub-agent registry in `TeraSubAgents.md` must remain stack-neutr
|
|
|
329
329
|
| `tera-system-evolution.md` | حارس المنظومة (تطوير Tera) | System |
|
|
330
330
|
| `red-team-agent.md` | الشبح — هجومي (Phase 7 gate) | Security |
|
|
331
331
|
| `security-observer.md` | العين — مراقب متزامن | Security |
|
|
332
|
-
| `security-auditor.md` | القاضي — تدقيق + قرار البوابة | Security |
|
|
332
|
+
| `security-auditor.md` | القاضي — تدقيق + قرار البوابة | Security |
|
|
333
|
+
| `security-agent.md` | الدرع — مراجعة دفاعية + defense-handoff/fix-review | Security |
|
|
333
334
|
|
|
334
335
|
---
|
|
335
336
|
|
|
@@ -339,7 +340,7 @@ but the generic sub-agent registry in `TeraSubAgents.md` must remain stack-neutr
|
|
|
339
340
|
- **لا تواصل مباشر بين العملاء.** الاستثناءات: Monitor→Auditor بطلب Majed؛ TCEA/Blueprint→Domain/ERP (بحث فقط).
|
|
340
341
|
- **لا تفعيل دون Trigger واضح** — `AGENT_ACTIVATION_MATRIX.md`.
|
|
341
342
|
- **الصلاحيات** — `AGENT_PERMISSION_MODEL.md`.
|
|
342
|
-
- **العملاء المشروطون/المساعدون** (Integration, DevOps, Performance, Compliance
|
|
343
|
+
- **العملاء المشروطون/المساعدون** (Integration, DevOps, Performance, Compliance...) في `TeraHelperAgents.md`. (الدرع أصبح عميلاً ثابتاً: `security-agent.md` — SCP-2026-10-03-002)
|
|
343
344
|
|
|
344
345
|
---
|
|
345
346
|
|
|
@@ -365,7 +366,7 @@ but the generic sub-agent registry in `TeraSubAgents.md` must remain stack-neutr
|
|
|
365
366
|
|
|
366
367
|
| الملف | الوظيفة |
|
|
367
368
|
|:------|:--------|
|
|
368
|
-
| `.opencode/agents/*.md` | التعريفات التشغيلية الكاملة (
|
|
369
|
+
| `.opencode/agents/*.md` | التعريفات التشغيلية الكاملة (26 عميلاً) |
|
|
369
370
|
| `AGENT_DEPENDENCY_MAP.md` | التبعيات والترتيب الآمن للتعديل |
|
|
370
371
|
| `AGENT_ACTIVATION_MATRIX.md` | متى يُفعَّل كل عميل |
|
|
371
372
|
| `AGENT_PERMISSION_MODEL.md` | الصلاحيات الافتراضية لكل عميل |
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tera-system/core",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Tera System OpenCode Plugin — governance core,
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "Tera System OpenCode Plugin — governance core, 26 agents, 39 commands, distribution tools (personal edition)",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|