@tera-system/core 0.1.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/LICENSE.md +13 -0
- package/MANIFEST.json +24 -0
- package/README.md +67 -0
- package/RELEASES.md +28 -0
- package/WELCOME.md +35 -0
- package/agents/application-blueprint.md +407 -0
- package/agents/auditor.md +665 -0
- package/agents/design-reviewer.md +392 -0
- package/agents/domain-expert-agent.md +510 -0
- package/agents/domain-research-agent.md +360 -0
- package/agents/engineering-agent-dotnet.md +218 -0
- package/agents/engineering-agent-phaser.md +275 -0
- package/agents/engineering-agent-typescript.md +300 -0
- package/agents/engineering-agent.md +143 -0
- package/agents/monitor.md +395 -0
- package/agents/production-erp-expert.md +506 -0
- package/agents/project-knowledge-agent.md +271 -0
- package/agents/qa-agent.md +498 -0
- package/agents/tera-business-transformation-consultant.md +290 -0
- package/agents/tera-client-engagement.md +891 -0
- package/agents/tera-software-designer.md +237 -0
- package/agents/tera-strategic-advisor.md +325 -0
- package/agents/tera-system-evolution.md +759 -0
- package/agents/tera.md +520 -0
- package/agents/ui-designer.md +426 -0
- package/commands/tera-approve.md +34 -0
- package/commands/tera-diagnose.md +47 -0
- package/commands/tera-gate.md +40 -0
- package/commands/tera-help.md +41 -0
- package/commands/tera-new-project.md +35 -0
- package/commands/tera-plan.md +34 -0
- package/commands/tera-request-build.md +45 -0
- package/commands/tera-resume.md +34 -0
- package/commands/tera-review.md +52 -0
- package/commands/tera-status.md +38 -0
- package/commands/tera-update.md +48 -0
- package/core/project-control/templates/TASK_TEMPLATE.md +146 -0
- package/core/tera-system/AGENT_ACTIVATION_MATRIX.md +285 -0
- package/core/tera-system/AGENT_DEPENDENCY_MAP.md +117 -0
- package/core/tera-system/AGENT_GENERATION_TEMPLATE.md +312 -0
- package/core/tera-system/AGENT_PERMISSION_MODEL.md +343 -0
- package/core/tera-system/AIS_PROTOCOL.md +191 -0
- package/core/tera-system/TERA_AGENT_CONDUCT.md +102 -0
- package/core/tera-system/TERA_CONTINUOUS_IMPROVEMENT_POLICY.md +111 -0
- package/core/tera-system/TERA_DISTRIBUTION_POLICY.md +291 -0
- package/core/tera-system/TERA_PROJECT_DECISION.md +281 -0
- package/core/tera-system/TERA_USER_GUIDE.md +462 -0
- package/core/tera-system/TOOLING_AND_MCP_POLICY.md +285 -0
- package/core/tera-system/TeraApplicationQuestionBank.md +362 -0
- package/core/tera-system/TeraArchitectureMap.md +91 -0
- package/core/tera-system/TeraClientPolicy.md +366 -0
- package/core/tera-system/TeraHelperAgents.md +970 -0
- package/core/tera-system/TeraPolicyMap.md +131 -0
- package/core/tera-system/TeraPreExecutionGate.md +818 -0
- package/core/tera-system/TeraPreparationDocumentationGovernance.md +370 -0
- package/core/tera-system/TeraPricingPolicy.md +674 -0
- package/core/tera-system/TeraProjectIntakePolicy.md +164 -0
- package/core/tera-system/TeraScenarioStressTests.md +168 -0
- package/core/tera-system/TeraSubAgents.md +854 -0
- package/core/tera-system/TeraSystemMaintenanceChecklist.md +80 -0
- package/core/tera-system/TeraTokenPolicy.md +362 -0
- package/core/tera-system/Tera_Project_Preparation_Files.md +1045 -0
- package/core/tera-system/agent-helpers/application-blueprint-details.md +177 -0
- package/core/tera-system/client-helpers/tera-client-engagement-discovery-domains.md +99 -0
- package/core/tera-system/client-helpers/tera-client-engagement-gates.md +258 -0
- package/core/tera-system/client-helpers/tera-client-engagement-pricing.md +341 -0
- package/core/tera-system/client-helpers/tera-client-engagement-protocols.md +692 -0
- package/core/tera-system/consulting-helpers/BTCA_METHODOLOGY_FRAMEWORK.md +195 -0
- package/core/tera-system/consulting-helpers/BTCA_REPORT_TEMPLATES.md +266 -0
- package/core/tera-system/design-system/ACCESSIBILITY_RULES.md +31 -0
- package/core/tera-system/design-system/COMPONENT_LIBRARY_SCHEMA.md +46 -0
- package/core/tera-system/design-system/DESIGN_MD_INTEGRATION.md +59 -0
- package/core/tera-system/design-system/DESIGN_REVIEW_STANDARDS.md +241 -0
- package/core/tera-system/design-system/DESIGN_SOURCE_PROTOCOL.md +61 -0
- package/core/tera-system/design-system/DESIGN_SYSTEM_OVERVIEW.md +66 -0
- package/core/tera-system/design-system/DESIGN_TOKENS_SCHEMA.md +66 -0
- package/core/tera-system/design-system/EXTERNAL_REFERENCE_ANALYSIS.md +52 -0
- package/core/tera-system/design-system/FIGMA_INTEGRATION.md +138 -0
- package/core/tera-system/design-system/INTERNAL_KITS_INDEX.md +26 -0
- package/core/tera-system/design-system/LAYOUT_PATTERNS.md +52 -0
- package/core/tera-system/design-system/MOBILE_UI_UX_STANDARDS.md +342 -0
- package/core/tera-system/design-system/RTL_LTR_RULES.md +39 -0
- package/core/tera-system/design-system/UI_ACCEPTANCE_GATE.md +80 -0
- package/core/tera-system/design-system/kits/KIT_ADMIN_DASHBOARD.md +102 -0
- package/core/tera-system/engineering-governance/ENGINEERING_AGENT_RESPONSIBILITIES.md +210 -0
- package/core/tera-system/engineering-governance/ENGINEERING_BEST_PRACTICES.md +468 -0
- package/core/tera-system/engineering-governance/ENGINEERING_GOVERNANCE_GATE.md +131 -0
- package/core/tera-system/engineering-governance/ENGINEERING_REVIEW_CHECKLIST.md +129 -0
- package/core/tera-system/engineering-governance/QUALITY_GATE_THRESHOLDS.md +159 -0
- package/core/tera-system/engineering-helpers/engineering-agent-core.md +171 -0
- package/core/tera-system/knowledge-base/OPENHANDS_ARCHITECTURE_REFERENCE.md +243 -0
- package/core/tera-system/knowledge-base/manufacturing/00_INDEX.md +32 -0
- package/core/tera-system/knowledge-base/manufacturing/01_MANUFACTURING_ERP_CORE_CONCEPTS.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/02_SAP_MANUFACTURING_RESEARCH.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/03_DYNAMICS_365_MANUFACTURING_RESEARCH.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/04_ORACLE_MANUFACTURING_RESEARCH.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/05_ODOO_MANUFACTURING_RESEARCH.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/06_ERPNEXT_MANUFACTURING_RESEARCH.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/07_MANUFACTURING_COSTING_GUIDE.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/08_PRODUCTION_DISCOVERY_QUESTIONS.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/09_MANUFACTURING_BLUEPRINT_CHECKLIST.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/10_PRODUCTION_TEST_SCENARIOS.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/11_QUALITY_REWORK_AND_SCRAP_GUIDE.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/12_MRP_AND_PLANNING_GUIDE.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/13_LOCAL_AND_REGIONAL_MANUFACTURING_CONTEXT.md +7 -0
- package/core/tera-system/knowledge-base/manufacturing/14_VENDOR_COMPARISON_MATRIX.md +7 -0
- package/core/tera-system/product-standards/maintenance-apps/BEST_PRACTICES_DOMAIN.md +325 -0
- package/core/tera-system/product-standards/maintenance-apps/STANDARD_DEFINITION.md +142 -0
- package/core/tera-system/profiles/PROFILES_INDEX.md +57 -0
- package/core/tera-system/profiles/TEMPLATE.md +47 -0
- package/core/tera-system/profiles/dotnet-blazor-ef.md +76 -0
- package/core/tera-system/profiles/dotnet-razorpages-adonet.md +137 -0
- package/core/tera-system/profiles/dotnet-wpf-sqlite.md +159 -0
- package/core/tera-system/profiles/effect-bun-opencode.md +109 -0
- package/core/tera-system/profiles/flutter-mobile.md +369 -0
- package/core/tera-system/profiles/nextjs-prisma.md +110 -0
- package/core/tera-system/profiles/phaser-react-node.md +302 -0
- package/core/tera-system/profiles/react-pwa.md +97 -0
- package/core/tera-system/runtime/CLIENT_DISCOVERY_PROTOCOL.md +145 -0
- package/core/tera-system/runtime/DOMAIN_INTELLIGENCE_PROTOCOL.md +124 -0
- package/core/tera-system/runtime/MVP_DEFINITION_PROTOCOL.md +176 -0
- package/core/tera-system/runtime/TERA_RUNTIME_CHECKLISTS.md +646 -0
- package/core/tera-system/runtime/TERA_RUNTIME_PROTOCOLS.md +50 -0
- package/core/tera-system/runtime/TERA_RUNTIME_PROTOCOLS_CLIENT.md +355 -0
- package/core/tera-system/runtime/TERA_RUNTIME_PROTOCOLS_CORE.md +799 -0
- package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES.md +908 -0
- package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md +584 -0
- package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES_PREPARATION.md +376 -0
- package/core/tera-system/runtime/TERA_SOLUTION_PREPARATION_PROTOCOL.md +335 -0
- package/core/tera-system/runtime/TERA_SOLUTION_PREPARATION_TEMPLATES.md +397 -0
- package/core/tera-system/runtime/VERSION_LIFECYCLE_PROTOCOL.md +296 -0
- package/core/tera-system/semgrep-rules/README.md +32 -0
- package/core/tera-system/semgrep-rules/tera-security.yml +66 -0
- package/core/tera-system/semgrep-rules/tera-standards.yml +49 -0
- package/core/tera-system/teranoo-ui/README.md +48 -0
- package/core/tera-system/teranoo-ui/components/button.tsx +51 -0
- package/core/tera-system/teranoo-ui/components/card.tsx +49 -0
- package/core/tera-system/teranoo-ui/components/dashboard-layout.tsx +36 -0
- package/core/tera-system/teranoo-ui/components/data-table.tsx +146 -0
- package/core/tera-system/teranoo-ui/components/empty-state.tsx +31 -0
- package/core/tera-system/teranoo-ui/components/kpi-card.tsx +42 -0
- package/core/tera-system/teranoo-ui/components/page-header.tsx +25 -0
- package/core/tera-system/teranoo-ui/components/search-input.tsx +40 -0
- package/core/tera-system/teranoo-ui/components/sidebar.tsx +66 -0
- package/core/tera-system/teranoo-ui/components/stats-card.tsx +37 -0
- package/core/tera-system/teranoo-ui/registry.json +77 -0
- package/core/tera-system/teranoo-ui/styles/teranoo-theme.css +61 -0
- package/opencode.tera.example.json +30 -0
- package/package.json +37 -0
- package/scripts/build.mjs +110 -0
- package/scripts/install.js +244 -0
- package/scripts/lib/license.mjs +90 -0
- package/scripts/lib/public-key.pem +3 -0
- package/scripts/tera-license.mjs +63 -0
- package/tools/tera-clean.ps1 +97 -0
- package/tools/tera-fetch.ps1 +165 -0
- package/tools/tera-release.ps1 +96 -0
- package/tools/tera-schedule.ps1 +59 -0
- package/tools/tera-update.ps1 +472 -0
- package/tools/tera-watch.ps1 +154 -0
- package/tools/update-client-repositories.ps1 +92 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
<!-- © 2026 Majed Khaireddin (Alabasi1980). Tera System — Proprietary. All rights reserved. -->
|
|
2
|
+
|
|
3
|
+
# AGENT_PERMISSION_MODEL.md
|
|
4
|
+
|
|
5
|
+
# نموذج صلاحيات العملاء الفرعيين — Sub-Agent Permission Model
|
|
6
|
+
|
|
7
|
+
يحدد هذا الملف **مستويات الصلاحيات** الرسمية لكل عميل فرعي في منظومة Tera.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## القاعدة الحاكمة
|
|
12
|
+
|
|
13
|
+
> **لكل عميل صلاحية محددة مسبقًا. لا يحق لأي عميل تجاوز صلاحيته الافتراضية دون قرار صريح من مالك التفعيل في مرحلته.**
|
|
14
|
+
> **SCP-2026-07-28-118:** مُهندس يملك صلاحية إدارة صلاحيات عملاء التحضير (1–4). TeraAgent يملك صلاحية إدارة صلاحيات عملاء التنفيذ (5–7).
|
|
15
|
+
|
|
16
|
+
الصلاحية تحدد:
|
|
17
|
+
- ماذا يمكن للعميل أن يفعل.
|
|
18
|
+
- ماذا يمكن للعميل أن يكتب.
|
|
19
|
+
- ماذا يمكن للعميل أن يقرأ.
|
|
20
|
+
- متى يحتاج موافقة إضافية.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 1. هرم الصلاحيات (من الأضعف إلى الأقوى)
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
┌─────────────────────┐
|
|
28
|
+
│ DEPLOY_WITH_APPROVAL │
|
|
29
|
+
│ (نشر + Build + Run) │
|
|
30
|
+
└──────────┬──────────┘
|
|
31
|
+
│
|
|
32
|
+
┌──────────▼──────────┐
|
|
33
|
+
│ WRITE_CODE │
|
|
34
|
+
│ (كتابة كود + تعديل) │
|
|
35
|
+
└──────────┬──────────┘
|
|
36
|
+
│
|
|
37
|
+
┌──────────▼──────────┐
|
|
38
|
+
│ RUN_TESTS │
|
|
39
|
+
│ (تشغيل اختبارات) │
|
|
40
|
+
└──────────┬──────────┘
|
|
41
|
+
│
|
|
42
|
+
┌──────────▼──────────┐
|
|
43
|
+
│ WRITE_CONTROL │
|
|
44
|
+
│ (سجلات التحكم فقط) │
|
|
45
|
+
└──────────┬──────────┘
|
|
46
|
+
│
|
|
47
|
+
┌──────────▼──────────┐
|
|
48
|
+
│ WRITE_KNOWLEDGE │
|
|
49
|
+
│ (معرفة تشغيلية فقط) │
|
|
50
|
+
└──────────┬──────────┘
|
|
51
|
+
│
|
|
52
|
+
┌──────────▼──────────┐
|
|
53
|
+
│ WRITE_DOCS │
|
|
54
|
+
│ (كتابة توثيق وتحضير)│
|
|
55
|
+
└──────────┬──────────┘
|
|
56
|
+
│
|
|
57
|
+
┌──────────▼──────────┐
|
|
58
|
+
│ PLAN_ONLY │
|
|
59
|
+
│ (تحليل + خطط فقط) │
|
|
60
|
+
└──────────┬──────────┘
|
|
61
|
+
│
|
|
62
|
+
┌──────────▼──────────┐
|
|
63
|
+
│ READ_ONLY │
|
|
64
|
+
│ (قراءة فقط — لا كتابة)│
|
|
65
|
+
└─────────────────────┘
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
الصلاحية الأعلى تشمل الصلاحيات الأدنى (إلا إذا نص على غير ذلك).
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 2. تعريف كل مستوى صلاحية
|
|
73
|
+
|
|
74
|
+
### 2.1 READ_ONLY
|
|
75
|
+
|
|
76
|
+
| البند | القيمة |
|
|
77
|
+
|---|---|
|
|
78
|
+
| الكود | ❌ لا يقرأ كود التطبيق إلا بإذن صريح |
|
|
79
|
+
| ملفات التحضير | ✅ يقرأ ما يسمح له Tera به |
|
|
80
|
+
| ملفات التحكم | ✅ يقرأ فقط |
|
|
81
|
+
| ملفات project-control | ✅ يقرأ فقط |
|
|
82
|
+
| وحدات التخزين الخارجية | ❌ لا يقرأ بدون إذن |
|
|
83
|
+
| كتابة أي ملف | ❌ ممنوع |
|
|
84
|
+
| تشغيل أدوات | ❌ ممنوع |
|
|
85
|
+
| إصدار تقارير | ✅ تقارير داخلية فقط لتيرا |
|
|
86
|
+
|
|
87
|
+
**متى يستخدم:** للعملاء الذين دورهم مراجعة أو تحليل فقط دون تعديل.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### 2.2 PLAN_ONLY
|
|
92
|
+
|
|
93
|
+
| البند | القيمة |
|
|
94
|
+
|---|---|
|
|
95
|
+
| قراءة | ✅ مثل READ_ONLY |
|
|
96
|
+
| كتابة ملفات تحضير | ✅ خطط وتحليلات فقط |
|
|
97
|
+
| كتابة ملفات تحكم | ❌ ممنوع |
|
|
98
|
+
| كتابة كود | ❌ ممنوع |
|
|
99
|
+
| تشغيل اختبارات | ❌ ممنوع |
|
|
100
|
+
| إصدار تقارير | ✅ تقارير تحليلية |
|
|
101
|
+
|
|
102
|
+
**متى يستخدم:** للعملاء الذين ينتجون تحليلات وخططًا لكن لا ينفذون ولا يتحكمون.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### 2.3 WRITE_DOCS
|
|
107
|
+
|
|
108
|
+
| البند | القيمة |
|
|
109
|
+
|---|---|
|
|
110
|
+
| قراءة | ✅ كل ما يلزم للمهمة |
|
|
111
|
+
| كتابة ملفات تحضير | ✅ نطاقه المحدد فقط |
|
|
112
|
+
| كتابة ملفات تصميم | ✅ حسب المهمة |
|
|
113
|
+
| كتابة ملفات تحكم | ❌ ممنوع إلا بتفويض |
|
|
114
|
+
| كتابة كود | ❌ ممنوع |
|
|
115
|
+
| تشغيل اختبارات | ❌ ممنوع |
|
|
116
|
+
| إنشاء ملفات جديدة | ✅ ضمن `Allowed Write Targets` فقط |
|
|
117
|
+
|
|
118
|
+
**متى يستخدم:** للعملاء الذين ينتجون توثيقًا أو تصميمًا أو تحضيرًا، مثل UIVisualDesignerAgent, DocumentationHandoverAgent.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### 2.4 WRITE_KNOWLEDGE
|
|
123
|
+
|
|
124
|
+
| البند | القيمة |
|
|
125
|
+
|---|---|
|
|
126
|
+
| قراءة | ✅ Primary Files (إلزامي) + Referenced Files (إن وُجدت) — كما يحددها TeraAgent |
|
|
127
|
+
| كتابة project-knowledge | ✅ مسموح — فقط داخل `project-knowledge/` |
|
|
128
|
+
| كتابة ملفات تحضير/تصميم | ❌ ممنوع |
|
|
129
|
+
| كتابة سجلات تحكم | ❌ ممنوع |
|
|
130
|
+
| كتابة كود | ❌ ممنوع |
|
|
131
|
+
| تشغيل أدوات | ❌ ممنوع |
|
|
132
|
+
| إنشاء ملفات جديدة | ✅ فقط داخل `project-knowledge/` |
|
|
133
|
+
|
|
134
|
+
**متى يستخدم:** حصريًا لـ ProjectKnowledgeAgent لتحديث ذاكرة المشروع التنفيذية بعد قبول المهام المؤثرة.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### 2.5 WRITE_CONTROL
|
|
139
|
+
|
|
140
|
+
| البند | القيمة |
|
|
141
|
+
|---|---|
|
|
142
|
+
| قراءة | ✅ كل project-control |
|
|
143
|
+
| كتابة سجلات التحكم | ✅ مسموح |
|
|
144
|
+
| كتابة TASK-ID / ISSUE-ID | ✅ إنشاء وتحديث |
|
|
145
|
+
| كتابة نشاط | ✅ تسجيل |
|
|
146
|
+
| كتابة ملفات تحضير | ❌ إلا بتفويض صريح من Tera |
|
|
147
|
+
| كتابة كود | ❌ ممنوع |
|
|
148
|
+
| تشغيل اختبارات | ❌ ممنوع |
|
|
149
|
+
| تغيير حالة مهمة | ❌ إلا بعد موافقة Tera |
|
|
150
|
+
|
|
151
|
+
**متى يستخدم:** حصريًا لـ ProjectControlAgent وبعض المهام الإدارية بتفويض.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
### 2.6 RUN_TESTS
|
|
156
|
+
|
|
157
|
+
| البند | القيمة |
|
|
158
|
+
|---|---|
|
|
159
|
+
| قراءة | ✅ كل الملفات اللازمة للاختبار |
|
|
160
|
+
| كتابة نصوص اختبارية | ✅ مسموح |
|
|
161
|
+
| تشغيل اختبارات | ✅ مسموح |
|
|
162
|
+
| كتابة تقارير اختبار | ✅ مسموح |
|
|
163
|
+
| كتابة كود تطبيق | ❌ ممنوع |
|
|
164
|
+
| كتابة ملفات تحضير | ❌ ممنوع |
|
|
165
|
+
| كتابة ملفات تحكم | ❌ إلا بتفويض |
|
|
166
|
+
| تعديل بيانات دائمة | ❌ ممنوع |
|
|
167
|
+
| حذف بيانات | ❌ ممنوع |
|
|
168
|
+
|
|
169
|
+
**متى يستخدم:** لـ qa-agent وأي عميل يحتاج تشغيل اختبارات.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### 2.7 WRITE_CODE
|
|
174
|
+
|
|
175
|
+
| البند | القيمة |
|
|
176
|
+
|---|---|
|
|
177
|
+
| قراءة | ✅ كل الملفات اللازمة |
|
|
178
|
+
| كتابة كود جديد | ✅ مسموح |
|
|
179
|
+
| تعديل كود موجود | ✅ مسموح |
|
|
180
|
+
| إنشاء ملفات تطبيق | ✅ مسموح ضمن المهمة |
|
|
181
|
+
| تشغيل أوامر build/run | ✅ مسموح |
|
|
182
|
+
| تشغيل اختبارات | ✅ مسموح للتحقق |
|
|
183
|
+
| كتابة ملفات تحضير | ❌ ممنوع |
|
|
184
|
+
| كتابة ملفات تحكم | ❌ ممنوع |
|
|
185
|
+
| تعديل project-control | ❌ ممنوع |
|
|
186
|
+
| DEPLOY | ❌ ممنوع بدون موافقة إضافية |
|
|
187
|
+
|
|
188
|
+
**متى يستخدم:** لـ EngineeringAgent وأي عميل تنفيذي.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
### 2.8 DEPLOY_WITH_APPROVAL
|
|
193
|
+
|
|
194
|
+
| البند | القيمة |
|
|
195
|
+
|---|---|
|
|
196
|
+
| كل صلاحيات WRITE_CODE | ✅ |
|
|
197
|
+
| نشر على بيئة | ✅ بعد موافقة صريحة |
|
|
198
|
+
| تعديل CI/CD | ✅ بعد موافقة صريحة |
|
|
199
|
+
| تغيير إعدادات بيئة | ✅ بعد موافقة صريحة |
|
|
200
|
+
| الوصول إلى production | ✅ بعد موافقة صريحة لكل مرة |
|
|
201
|
+
| تنفيذ migrations في production | ✅ بعد موافقة صريحة وخطة rollback |
|
|
202
|
+
|
|
203
|
+
**متى يستخدم:** لـ DevOpsDeploymentAgent فقط، وبعد موافقة Tera أو المستخدم لكل عملية نشر على حدة.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## 3. مصفوفة الصلاحية الافتراضية لكل عميل
|
|
208
|
+
|
|
209
|
+
### 3.1 العملاء الأساسيون
|
|
210
|
+
|
|
211
|
+
| العميل | المعرف | الصلاحية الافتراضية | هل يمكن رفعها؟ | ملاحظة |
|
|
212
|
+
|---|---|---|---|---|
|
|
213
|
+
| RequirementsScopeAgent | `REQ_SCOPE_AGENT` | `WRITE_DOCS` | إلى PLAN_ONLY إذا كان التحليل فقط | يكتب ملفات النطاق والمتطلبات فقط |
|
|
214
|
+
| BusinessWorkflowAgent | `BUSINESS_WORKFLOW_AGENT` | `WRITE_DOCS` | — | يكتب ملفات سير العمل فقط |
|
|
215
|
+
| UIUXStructureAgent | `UI_UX_STRUCTURE_AGENT` | `WRITE_DOCS` | — | يكتب هيكل الشاشات فقط |
|
|
216
|
+
| UIVisualDesignerAgent | `UI_VISUAL_DESIGNER_AGENT` | `WRITE_DOCS` | إلى READ_ONLY إذا كان مراجعة فقط | يكتب دليل التصميم والتوكينز فقط |
|
|
217
|
+
| DataDesignAgent | `DATA_DESIGN_AGENT` | `WRITE_DOCS` | — | يكتب نموذج البيانات فقط |
|
|
218
|
+
| SolutionArchitectureAgent | `SOLUTION_ARCH_AGENT` | `WRITE_DOCS` | إلى PLAN_ONLY إذا كان تحليلًا فقط | يكتب المعمارية فقط |
|
|
219
|
+
| EngineeringAgent | `ENGINEERING_AGENT` | `WRITE_CODE` | إلى READ_ONLY إذا كانت مراجعة كود فقط | مستوى عالٍ، يجب مراقبته |
|
|
220
|
+
| qa-agent | `QA_ACCEPTANCE_AGENT` | `RUN_TESTS` | إلى READ_ONLY إذا كان مراجعة فقط | **Planning Mode:** `WRITE_DOCS` — يكتب خطط الاختبار ومعايير القبول. **Execution Mode:** `RUN_TESTS` + bash — يشغّل أوامر CLI (dotnet build/test/run) ويكتب تقارير اختبار رسمية |
|
|
221
|
+
| DocumentationHandoverAgent | `DOC_HANDOVER_AGENT` | `WRITE_DOCS` | — | يكتب وثائق التسليم فقط |
|
|
222
|
+
| ProjectKnowledgeAgent | `PROJECT_KNOWLEDGE_AGENT` | `WRITE_KNOWLEDGE` | — | يكتب معرفة تشغيلية فقط داخل project-knowledge/ |
|
|
223
|
+
|
|
224
|
+
### 3.2 العملاء المشروطون
|
|
225
|
+
|
|
226
|
+
| العميل | المعرف | الصلاحية الافتراضية | هل يمكن رفعها؟ | ملاحظة |
|
|
227
|
+
|---|---|---|---|---|
|
|
228
|
+
| SecurityAgent | `SECURITY_AGENT` | `READ_ONLY` | إلى `WRITE_DOCS` عند توثيق findings | لا يكتب كودًا أبدًا |
|
|
229
|
+
| IntegrationAgent | `INTEGRATION_AGENT` | `WRITE_DOCS` | إلى `WRITE_CODE` لتعديل كود التكامل فقط إذا فوضه Tera صراحة | يوثق التكاملات |
|
|
230
|
+
| DevOpsDeploymentAgent | `DEVOPS_DEPLOYMENT_AGENT` | `WRITE_CODE` | إلى `DEPLOY_WITH_APPROVAL` عند النشر | يتطلب موافقة لكل نشر |
|
|
231
|
+
| PerformanceAgent | `PERFORMANCE_AGENT` | `READ_ONLY` | إلى `WRITE_DOCS` عند توثيق التوصيات | يحلل فقط |
|
|
232
|
+
| ComplianceAgent | `COMPLIANCE_AGENT` | `READ_ONLY` | إلى `WRITE_DOCS` عند توثيق الملاحظات | يحلل فقط |
|
|
233
|
+
| ReportingAnalyticsAgent | `REPORTING_ANALYTICS_AGENT` | `WRITE_DOCS` | — | يوثق متطلبات التقارير |
|
|
234
|
+
| MaintenanceMigrationAgent | `MAINTENANCE_MIGRATION_AGENT` | `WRITE_DOCS` | — | يخطط للترحيل |
|
|
235
|
+
| ProjectControlAgent | `PROJECT_CONTROL_AGENT` | `WRITE_CONTROL` | — | يتحكم في سجلات المشروع فقط |
|
|
236
|
+
| SoftwareDesignerAgent | `SOFTWARE_DESIGNER_AGENT` | `WRITE_DOCS` | إلى `PLAN_ONLY` إذا ما زالت الخطة غير ناضجة | يجهز Technical Specification للمهام فقط |
|
|
237
|
+
| QualityReviewCoordinatorAgent | `QUALITY_REVIEW_COORDINATOR_AGENT` | `READ_ONLY` | إلى `WRITE_DOCS` عند تسليم تقرير فقط | ينسق المراجعة فقط |
|
|
238
|
+
| PlanComplianceReviewAgent | `PLAN_COMPLIANCE_REVIEW_AGENT` | `READ_ONLY` | إلى `WRITE_DOCS` عند تسليم التقرير فقط | يراجع توافق الخطة فقط |
|
|
239
|
+
| DomainResearchAgent | `DOMAIN_RESEARCH_AGENT` | `READ_ONLY` | إلى `WRITE_DOCS` عند تسليم التقرير | يبحث فقط |
|
|
240
|
+
| DomainExpertAgent | `DOMAIN_EXPERT_AGENT` | `READ_ONLY` | إلى `WRITE_DOCS` عند تسليم التحليل | يحلل فقط |
|
|
241
|
+
| ProductionERPExpert | `PRODUCTION_ERP_EXPERT` | `READ_ONLY` | إلى `WRITE_DOCS` عند تسليم تحليل أو أسئلة أو مراجعة Blueprint ضمن Allowed Write Targets | مستشار Production ERP؛ لا يكتب كوداً ولا يقرر النطاق أو التكلفة النهائية |
|
|
242
|
+
|
|
243
|
+
### 3.3 عملاء التعامل مع العملاء الخارجيين
|
|
244
|
+
|
|
245
|
+
| العميل | المعرف | الصلاحية الافتراضية | هل يمكن رفعها؟ | ملاحظة |
|
|
246
|
+
|---|---|---|---|---|
|
|
247
|
+
| ClientDiscoveryAgent | `CLIENT_DISCOVERY_AGENT` | `WRITE_DOCS` | — | يكتب في client-inputs فقط |
|
|
248
|
+
| ProposalScopeAgent | `PROPOSAL_SCOPE_AGENT` | `WRITE_DOCS` | — | يكتب proposal و scope فقط |
|
|
249
|
+
| ClientApprovalReviewAgent | `CLIENT_APPROVAL_REVIEW_AGENT` | `READ_ONLY` | إلى `WRITE_DOCS` عند تدوين ملاحظات المراجعة | يراجع فقط |
|
|
250
|
+
| ChangeControlAgent | `CHANGE_CONTROL_AGENT` | `WRITE_DOCS` | — | يوثق طلب التغيير فقط |
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## 4. رفع الصلاحية أو خفضها
|
|
255
|
+
|
|
256
|
+
### 4.1 رفع الصلاحية
|
|
257
|
+
|
|
258
|
+
يتم رفع صلاحية عميل فقط عندما:
|
|
259
|
+
|
|
260
|
+
1. Tera يقرر أن المهمة تتطلب صلاحية أعلى.
|
|
261
|
+
2. يتم توثيق رفع الصلاحية في `TASK-ID` أو `DECISIONS_LOG.md`.
|
|
262
|
+
3. الرفع يكون للمهمة الحالية فقط (لا يصبح دائمًا).
|
|
263
|
+
|
|
264
|
+
مثال:
|
|
265
|
+
```
|
|
266
|
+
EngineeringAgent يبدأ بـ WRITE_CODE
|
|
267
|
+
Tera يحتاجه لنشر fix عاجل → يرفع إلى DEPLOY_WITH_APPROVAL
|
|
268
|
+
بعد النشر → يعود إلى WRITE_CODE
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### 4.2 خفض الصلاحية
|
|
272
|
+
|
|
273
|
+
يتم خفض صلاحية عميل عندما:
|
|
274
|
+
|
|
275
|
+
1. المهمة لا تحتاج الصلاحية العالية.
|
|
276
|
+
2. هناك خطر من التعديل غير المصرح به.
|
|
277
|
+
3. العميل يستخدم للمراجعة فقط.
|
|
278
|
+
|
|
279
|
+
مثال:
|
|
280
|
+
```
|
|
281
|
+
EngineeringAgent يُستخدم لمراجعة كود فقط → يخفض إلى READ_ONLY
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### 4.3 صلاحية افتراضية للأدوات / MCPs
|
|
285
|
+
|
|
286
|
+
> **المرجع الكامل:** `tera-system/TOOLING_AND_MCP_POLICY.md` — يُحدّث قائمة MCPs المفعلة فعلياً وأدوات CLI في البوابات.
|
|
287
|
+
> **الوضع الحالي (2026-07-31):** MCPs المفعلة: Playwright, Semgrep, Structurizr. أدوات CLI في البوابات: Semgrep, Trivy, Gitleaks. مكتبات الجودة: axe-core, Testcontainers, Bruno.
|
|
288
|
+
|
|
289
|
+
| الأداة | الصلاحية الافتراضية | ملاحظة |
|
|
290
|
+
|---|---|---|
|
|
291
|
+
| Playwright / Browser MCP | `RUN_TESTS` | لا يعدل كودًا |
|
|
292
|
+
| Semgrep MCP / CLI | `RUN_TESTS` | فحص ثابت — لا يعدّل |
|
|
293
|
+
| Structurizr MCP | `READ_WRITE` (ملفات `.dsl` فقط) | لا يعدّل كود تطبيق |
|
|
294
|
+
| Trivy / Gitleaks (CLI Gates) | `RUN_TESTS` | فحص أمني — لا يعدّل |
|
|
295
|
+
| API Testing / Git/GitHub / Database MCPs | `READ_ONLY` (مؤجلة — غير مفعلة حالياً) | تُفعَّل عند الحاجة وفق السياسة |
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## 5. قواعد الصلاحية الإضافية
|
|
300
|
+
|
|
301
|
+
### 5.1 الصلاحية الأقل هي الأصل
|
|
302
|
+
|
|
303
|
+
```
|
|
304
|
+
عند الشك بين صلاحيتين، اختر الصلاحية الأقل.
|
|
305
|
+
يمكن رفع الصلاحية لاحقًا بقرار من Tera، لكن لا يمكن استرجاع تغيير غير مصرح به.
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### 5.2 لا صلاحية دائمة لمشاريع متعددة
|
|
309
|
+
|
|
310
|
+
```
|
|
311
|
+
صلاحية العميل تُحدد لكل مشروع على حدة.
|
|
312
|
+
لا تنتقل الصلاحية من مشروع إلى آخر.
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### 5.3 تسجيل أي تغيير في الصلاحية
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
أي رفع أو خفض للصلاحية يُسجل في `DECISIONS_LOG.md`.
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### 5.4 صلاحية الأدوات
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
أي أداة أو MCP تُستخدم ضمن مهمة عميل تخضع لصلاحية ذلك العميل.
|
|
325
|
+
إذا كانت صلاحية العميل READ_ONLY، فالأداة أيضًا READ_ONLY.
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### 5.5 صلاحية خاصة: `NO_WRITE`
|
|
329
|
+
|
|
330
|
+
```
|
|
331
|
+
للعملاء الذين يحتاجون قراءة فقط ولا يملكون أي صلاحية كتابة.
|
|
332
|
+
مطبق افتراضيًا على DomainResearchAgent و DomainExpertAgent و QualityReviewCoordinatorAgent.
|
|
333
|
+
يمكن رفعه إلى `WRITE_DOCS` فقط لتسليم التقرير.
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## 6. الملخص — قاعدة الصلاحية الذهبية
|
|
339
|
+
|
|
340
|
+
> **العميل لا يملك صلاحية أكثر مما يحتاجه لإنجاز مهمته المحددة.**
|
|
341
|
+
>
|
|
342
|
+
> Tera يقرر الصلاحية لكل مهمة، ويسجل أي تغيير.
|
|
343
|
+
> لا توجد صلاحية دائمة أو شاملة لأي عميل.
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Agent Improvement Suggestions (AIS) Protocol — allows core agents to propose self-improvements from real work experience, without self-modification.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- © 2026 Majed Khaireddin (Alabasi1980). Tera System — Proprietary. All rights reserved. -->
|
|
6
|
+
|
|
7
|
+
# Agent Improvement Suggestions Protocol (AIS)
|
|
8
|
+
|
|
9
|
+
## 1. Purpose
|
|
10
|
+
|
|
11
|
+
This protocol enables every core agent in the Tera system to propose improvements to their own operating instructions or related system files — based on **real work experience** — without modifying themselves or any governance file.
|
|
12
|
+
|
|
13
|
+
It is a **structured suggestion channel**, not a self-modification permission.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 2. Scope
|
|
18
|
+
|
|
19
|
+
Applies to all core agents:
|
|
20
|
+
|
|
21
|
+
- TeraAgent
|
|
22
|
+
- TeraClientEngagementAgent
|
|
23
|
+
- TeraSystemEvolutionAgent (حارس)
|
|
24
|
+
- Monitor (رقيب)
|
|
25
|
+
- Auditor (مدقق)
|
|
26
|
+
- DesignReviewer (ناقد)
|
|
27
|
+
- ApplicationBlueprintAgent
|
|
28
|
+
- SoftwareDesignerAgent
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 3. What an Agent May Suggest
|
|
33
|
+
|
|
34
|
+
| Type | Example |
|
|
35
|
+
|------|---------|
|
|
36
|
+
| **Ambiguity** | Instruction unclear about what to do when data is missing |
|
|
37
|
+
| **Missing Rule** | No rule exists for a recurring operational situation |
|
|
38
|
+
| **Conflict** | Two files or instructions contradict each other |
|
|
39
|
+
| **Workflow Improvement** | Task order could be more efficient |
|
|
40
|
+
| **Quality Risk** | Current process may produce inaccurate output |
|
|
41
|
+
| **Cost Control** | Pricing or scope estimation lacks a necessary guardrail |
|
|
42
|
+
| **Client Handling** | Client interaction pattern reveals a gap in the engagement process |
|
|
43
|
+
| **Skill Gap** | Agent frequently needs a piece of knowledge it does not have (cheatsheet, quick reference, comparison table) |
|
|
44
|
+
| **Pattern Discovery** | Recurring pattern observed across multiple projects that could be documented as a best practice |
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 4. What an Agent Must NOT Suggest
|
|
49
|
+
|
|
50
|
+
The agent must NOT:
|
|
51
|
+
|
|
52
|
+
- Modify its own operating file or any governance file
|
|
53
|
+
- Create new rules as active rules
|
|
54
|
+
- Bypass current rules because it thinks an improvement is needed
|
|
55
|
+
- Generate excessive suggestions (see §6 Anti-Spam)
|
|
56
|
+
- Suggest cosmetic wording changes unless they affect execution
|
|
57
|
+
- Propose changes without evidence from the current task
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 5. When to Record — Conditions
|
|
62
|
+
|
|
63
|
+
An agent may record a suggestion **only if** at least one of these conditions is met:
|
|
64
|
+
|
|
65
|
+
| Condition | Meaning |
|
|
66
|
+
|-----------|---------|
|
|
67
|
+
| **Repeated Friction** | The issue occurred more than once |
|
|
68
|
+
| **Blocking Ambiguity** | Ambiguity stopped work or required a decision |
|
|
69
|
+
| **Quality Risk** | Risk to output quality exists |
|
|
70
|
+
| **Scope Risk** | Risk of scope creep or unsupported estimation |
|
|
71
|
+
| **Missing Rule** | No clear rule for a situation that appeared |
|
|
72
|
+
| **Conflict** | Two files or instructions contradict each other |
|
|
73
|
+
| **Client Confusion** | Client was confused or asked clarifying questions due to weak process |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 6. Anti-Spam Rule
|
|
78
|
+
|
|
79
|
+
Each agent may record **at most 3 suggestions per task/session**, unless a critical conflict is found.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 7. AIS vs GAP — Boundary Rule
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
GAP (AGENT_GAPS_LOG.md)
|
|
87
|
+
→ Something is broken, missing, or prevents correct execution
|
|
88
|
+
→ e.g., missing permission, conflicting policy, stale reference
|
|
89
|
+
|
|
90
|
+
AIS (AGENT_IMPROVEMENT_SUGGESTIONS.md)
|
|
91
|
+
→ Execution is correct but could be better, faster, clearer, or more skilled
|
|
92
|
+
→ e.g., recurring pattern, skill gap, workflow efficiency, template improvement
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
If a situation fits both, use **GAP** (broken takes priority over improvement).
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 8. Suggestion Template
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
## AIS-0001 — [Agent Name] — [Short Title]
|
|
103
|
+
|
|
104
|
+
**Date:** YYYY-MM-DD
|
|
105
|
+
**Agent:** [Agent Name]
|
|
106
|
+
**Related Task / Session:** TASK-ID or DRYRUN-ID
|
|
107
|
+
**Severity:** Low / Medium / High
|
|
108
|
+
**Type:** Ambiguity / Missing Rule / Conflict / Workflow Improvement / Quality Risk / Cost Control / Client Handling / Skill Gap / Pattern Discovery
|
|
109
|
+
|
|
110
|
+
### Observation
|
|
111
|
+
What happened during the work?
|
|
112
|
+
|
|
113
|
+
### Evidence
|
|
114
|
+
Quote the exact instruction, file, output, or situation that caused the issue.
|
|
115
|
+
|
|
116
|
+
### Impact
|
|
117
|
+
What risk does this create if not fixed?
|
|
118
|
+
|
|
119
|
+
### Proposed Improvement
|
|
120
|
+
What should be changed or added?
|
|
121
|
+
|
|
122
|
+
### Suggested Target File
|
|
123
|
+
Which file likely needs update?
|
|
124
|
+
|
|
125
|
+
### Execution Authority
|
|
126
|
+
This suggestion is NOT active.
|
|
127
|
+
It requires review by Majed and formal implementation through TeraSystemEvolutionAgent (Hares) after approval.
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## 9. Suggestion Lifecycle
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
Proposed → Under Review → Approved for SCP → Implemented
|
|
136
|
+
→ Rejected
|
|
137
|
+
→ Deferred
|
|
138
|
+
→ Verified
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
| Status | Meaning | Who Sets It |
|
|
142
|
+
|--------|---------|------------|
|
|
143
|
+
| **Proposed** | New suggestion, not yet reviewed | The agent |
|
|
144
|
+
| **Under Review** | Being analyzed by TeraSystemEvolutionAgent | Hares |
|
|
145
|
+
| **Approved for SCP** | Accepted — will become a SYSTEM_CHANGE_PROPOSAL | Hares after Majed direction |
|
|
146
|
+
| **Rejected** | Rejected with a clear reason | Hares |
|
|
147
|
+
| **Deferred** | Postponed to a later review cycle | Hares |
|
|
148
|
+
| **Implemented** | Change executed and logged | Hares |
|
|
149
|
+
| **Verified** | Post-implementation validation passed | Hares or Majed |
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## 10. Processing Cycle
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
Agent notices improvement opportunity during work
|
|
157
|
+
→ Records AIS in project-control/AGENT_IMPROVEMENT_SUGGESTIONS.md
|
|
158
|
+
→ Continues work without interruption
|
|
159
|
+
→ Majed reviews periodically or on request
|
|
160
|
+
→ TeraSystemEvolutionAgent (Hares) validates the suggestion
|
|
161
|
+
→ If Approved for SCP → Hares produces SYSTEM_CHANGE_PROPOSAL
|
|
162
|
+
→ Majed approves/rejects the proposal
|
|
163
|
+
→ Hares implements approved changes
|
|
164
|
+
→ Hares logs in SYSTEM_EVOLUTION_LOG.md
|
|
165
|
+
→ Hares updates AIS status to Implemented / Verified
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 11. Relationship with Other System Files
|
|
171
|
+
|
|
172
|
+
| File | Relationship |
|
|
173
|
+
|------|-------------|
|
|
174
|
+
| `project-control/AGENT_IMPROVEMENT_SUGGESTIONS.md` | Central log for all AIS entries |
|
|
175
|
+
| `project-control/AGENT_GAPS_LOG.md` | AIS is complementary — GAPS = broken, AIS = improvement |
|
|
176
|
+
| `project-control/SYSTEM_EVOLUTION_LOG.md` | Approved AIS changes are logged here after implementation |
|
|
177
|
+
| `tera-system/TERA_CONTINUOUS_IMPROVEMENT_POLICY.md` | General improvement awareness — AIS is a specific mechanism under it |
|
|
178
|
+
| `tera-system/TeraPolicyMap.md` | Maps this protocol as source of truth for AIS |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 12. Authority
|
|
183
|
+
|
|
184
|
+
This protocol is governed by `TeraSystemEvolutionAgent (حارس)`.
|
|
185
|
+
|
|
186
|
+
No agent may use this protocol to justify self-modification.
|
|
187
|
+
All approved changes must pass through SYSTEM_CHANGE_PROPOSAL → Majed approval → Hares execution.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
> *"العميل يرى النمط. حارس ينفذ التغيير. Majed يقرر."*
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<!-- © 2026 Majed Khaireddin (Alabasi1980). Tera System — Proprietary. All rights reserved. -->
|
|
2
|
+
|
|
3
|
+
# TERA_AGENT_CONDUCT.md
|
|
4
|
+
|
|
5
|
+
## 1. Purpose
|
|
6
|
+
|
|
7
|
+
This file defines the mandatory conduct gate for core Tera agents.
|
|
8
|
+
|
|
9
|
+
It exists to reduce rule drift, prevent unauthorized initiative, and keep agent files clean by centralizing the smallest set of cross-agent behavior rules.
|
|
10
|
+
|
|
11
|
+
## 2. Scope
|
|
12
|
+
|
|
13
|
+
This conduct gate applies to core runtime agents under:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
.opencode/agents/
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
including:
|
|
20
|
+
|
|
21
|
+
- `tera.md`
|
|
22
|
+
- `tera-client-engagement.md`
|
|
23
|
+
- `application-blueprint.md`
|
|
24
|
+
- `tera-system-evolution.md`
|
|
25
|
+
- `tera-strategic-advisor.md`
|
|
26
|
+
- `auditor.md`
|
|
27
|
+
- `monitor.md`
|
|
28
|
+
- `design-reviewer.md`
|
|
29
|
+
- `tera-software-designer.md`
|
|
30
|
+
|
|
31
|
+
## 3. Immutable Rules
|
|
32
|
+
|
|
33
|
+
These rules override preference, initiative, and convenience.
|
|
34
|
+
|
|
35
|
+
1. **Read this file first** before any file edit, write, shell command, or approval-sensitive action.
|
|
36
|
+
2. **Do not act outside approved authority.**
|
|
37
|
+
- Owner-governed agents require Majed approval where their role says so.
|
|
38
|
+
- Tera-governed sub-agents require explicit Tera task scope and allowed targets.
|
|
39
|
+
3. **Do not skip mandatory gates** or silently bypass required reviews, confirmations, or approvals.
|
|
40
|
+
4. **Do not expand the system** by adding agents, folders, tools, MCPs, or persistent rules without explicit approval and the proper proposal path.
|
|
41
|
+
5. **When in doubt: stop and ask.** Never continue on uncertainty that affects authority, scope, safety, or governance.
|
|
42
|
+
6. **Advisory separation:** owner-level strategic advice is not approval, execution authorization, or task delegation. Advisory agents must remain independent, non-executing, and explicit about assumptions.
|
|
43
|
+
|
|
44
|
+
## 4. Pre-Action Gate
|
|
45
|
+
|
|
46
|
+
Before any non-trivial action, especially:
|
|
47
|
+
|
|
48
|
+
- editing or writing files
|
|
49
|
+
- running shell commands
|
|
50
|
+
- changing system or runtime files
|
|
51
|
+
- creating folders or agent files
|
|
52
|
+
- making approval-sensitive decisions
|
|
53
|
+
|
|
54
|
+
the agent must check and confirm:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
Pre-Action Gate
|
|
58
|
+
- I have read TERA_AGENT_CONDUCT.md.
|
|
59
|
+
- This action is within my allowed authority. Yes / No
|
|
60
|
+
- The required approval or delegation exists. Yes / No / N/A
|
|
61
|
+
- I am not skipping any mandatory gate. Yes / No
|
|
62
|
+
- I am using the smallest sufficient action. Yes / No
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If any answer is `No` or unclear, the agent must stop and ask.
|
|
66
|
+
|
|
67
|
+
For simple conversational replies with no tool use, file change, or governance effect, the agent does not need to print the checklist explicitly.
|
|
68
|
+
|
|
69
|
+
## 5. Uncertainty Rule
|
|
70
|
+
|
|
71
|
+
If the agent is unsure whether an action is allowed, the response must be:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
STOP
|
|
75
|
+
Intended action:
|
|
76
|
+
Why I am unsure:
|
|
77
|
+
Decision needed from Majed or Tera:
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
No hidden continuation is allowed after that point.
|
|
81
|
+
|
|
82
|
+
## 6. Task Completion Check
|
|
83
|
+
|
|
84
|
+
After completing a meaningful task or tool-backed action, the agent should confirm internally — and explicitly when governance-sensitive — that:
|
|
85
|
+
|
|
86
|
+
- the immutable rules were followed
|
|
87
|
+
- approvals or delegation boundaries were respected
|
|
88
|
+
- no skipped gate remains
|
|
89
|
+
- any discovered gap or uncertainty was reported through the correct path
|
|
90
|
+
|
|
91
|
+
## 7. Gap Reporting Reference
|
|
92
|
+
|
|
93
|
+
This file does not replace the official improvement policy.
|
|
94
|
+
|
|
95
|
+
For improvement and gap reporting, use:
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
tera-system/TERA_CONTINUOUS_IMPROVEMENT_POLICY.md
|
|
99
|
+
project-control/AGENT_GAPS_LOG.md
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Use those files as the official path for observing, recording, and routing core-agent or system gaps.
|