@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.
Files changed (161) hide show
  1. package/LICENSE.md +13 -0
  2. package/MANIFEST.json +24 -0
  3. package/README.md +67 -0
  4. package/RELEASES.md +28 -0
  5. package/WELCOME.md +35 -0
  6. package/agents/application-blueprint.md +407 -0
  7. package/agents/auditor.md +665 -0
  8. package/agents/design-reviewer.md +392 -0
  9. package/agents/domain-expert-agent.md +510 -0
  10. package/agents/domain-research-agent.md +360 -0
  11. package/agents/engineering-agent-dotnet.md +218 -0
  12. package/agents/engineering-agent-phaser.md +275 -0
  13. package/agents/engineering-agent-typescript.md +300 -0
  14. package/agents/engineering-agent.md +143 -0
  15. package/agents/monitor.md +395 -0
  16. package/agents/production-erp-expert.md +506 -0
  17. package/agents/project-knowledge-agent.md +271 -0
  18. package/agents/qa-agent.md +498 -0
  19. package/agents/tera-business-transformation-consultant.md +290 -0
  20. package/agents/tera-client-engagement.md +891 -0
  21. package/agents/tera-software-designer.md +237 -0
  22. package/agents/tera-strategic-advisor.md +325 -0
  23. package/agents/tera-system-evolution.md +759 -0
  24. package/agents/tera.md +520 -0
  25. package/agents/ui-designer.md +426 -0
  26. package/commands/tera-approve.md +34 -0
  27. package/commands/tera-diagnose.md +47 -0
  28. package/commands/tera-gate.md +40 -0
  29. package/commands/tera-help.md +41 -0
  30. package/commands/tera-new-project.md +35 -0
  31. package/commands/tera-plan.md +34 -0
  32. package/commands/tera-request-build.md +45 -0
  33. package/commands/tera-resume.md +34 -0
  34. package/commands/tera-review.md +52 -0
  35. package/commands/tera-status.md +38 -0
  36. package/commands/tera-update.md +48 -0
  37. package/core/project-control/templates/TASK_TEMPLATE.md +146 -0
  38. package/core/tera-system/AGENT_ACTIVATION_MATRIX.md +285 -0
  39. package/core/tera-system/AGENT_DEPENDENCY_MAP.md +117 -0
  40. package/core/tera-system/AGENT_GENERATION_TEMPLATE.md +312 -0
  41. package/core/tera-system/AGENT_PERMISSION_MODEL.md +343 -0
  42. package/core/tera-system/AIS_PROTOCOL.md +191 -0
  43. package/core/tera-system/TERA_AGENT_CONDUCT.md +102 -0
  44. package/core/tera-system/TERA_CONTINUOUS_IMPROVEMENT_POLICY.md +111 -0
  45. package/core/tera-system/TERA_DISTRIBUTION_POLICY.md +291 -0
  46. package/core/tera-system/TERA_PROJECT_DECISION.md +281 -0
  47. package/core/tera-system/TERA_USER_GUIDE.md +462 -0
  48. package/core/tera-system/TOOLING_AND_MCP_POLICY.md +285 -0
  49. package/core/tera-system/TeraApplicationQuestionBank.md +362 -0
  50. package/core/tera-system/TeraArchitectureMap.md +91 -0
  51. package/core/tera-system/TeraClientPolicy.md +366 -0
  52. package/core/tera-system/TeraHelperAgents.md +970 -0
  53. package/core/tera-system/TeraPolicyMap.md +131 -0
  54. package/core/tera-system/TeraPreExecutionGate.md +818 -0
  55. package/core/tera-system/TeraPreparationDocumentationGovernance.md +370 -0
  56. package/core/tera-system/TeraPricingPolicy.md +674 -0
  57. package/core/tera-system/TeraProjectIntakePolicy.md +164 -0
  58. package/core/tera-system/TeraScenarioStressTests.md +168 -0
  59. package/core/tera-system/TeraSubAgents.md +854 -0
  60. package/core/tera-system/TeraSystemMaintenanceChecklist.md +80 -0
  61. package/core/tera-system/TeraTokenPolicy.md +362 -0
  62. package/core/tera-system/Tera_Project_Preparation_Files.md +1045 -0
  63. package/core/tera-system/agent-helpers/application-blueprint-details.md +177 -0
  64. package/core/tera-system/client-helpers/tera-client-engagement-discovery-domains.md +99 -0
  65. package/core/tera-system/client-helpers/tera-client-engagement-gates.md +258 -0
  66. package/core/tera-system/client-helpers/tera-client-engagement-pricing.md +341 -0
  67. package/core/tera-system/client-helpers/tera-client-engagement-protocols.md +692 -0
  68. package/core/tera-system/consulting-helpers/BTCA_METHODOLOGY_FRAMEWORK.md +195 -0
  69. package/core/tera-system/consulting-helpers/BTCA_REPORT_TEMPLATES.md +266 -0
  70. package/core/tera-system/design-system/ACCESSIBILITY_RULES.md +31 -0
  71. package/core/tera-system/design-system/COMPONENT_LIBRARY_SCHEMA.md +46 -0
  72. package/core/tera-system/design-system/DESIGN_MD_INTEGRATION.md +59 -0
  73. package/core/tera-system/design-system/DESIGN_REVIEW_STANDARDS.md +241 -0
  74. package/core/tera-system/design-system/DESIGN_SOURCE_PROTOCOL.md +61 -0
  75. package/core/tera-system/design-system/DESIGN_SYSTEM_OVERVIEW.md +66 -0
  76. package/core/tera-system/design-system/DESIGN_TOKENS_SCHEMA.md +66 -0
  77. package/core/tera-system/design-system/EXTERNAL_REFERENCE_ANALYSIS.md +52 -0
  78. package/core/tera-system/design-system/FIGMA_INTEGRATION.md +138 -0
  79. package/core/tera-system/design-system/INTERNAL_KITS_INDEX.md +26 -0
  80. package/core/tera-system/design-system/LAYOUT_PATTERNS.md +52 -0
  81. package/core/tera-system/design-system/MOBILE_UI_UX_STANDARDS.md +342 -0
  82. package/core/tera-system/design-system/RTL_LTR_RULES.md +39 -0
  83. package/core/tera-system/design-system/UI_ACCEPTANCE_GATE.md +80 -0
  84. package/core/tera-system/design-system/kits/KIT_ADMIN_DASHBOARD.md +102 -0
  85. package/core/tera-system/engineering-governance/ENGINEERING_AGENT_RESPONSIBILITIES.md +210 -0
  86. package/core/tera-system/engineering-governance/ENGINEERING_BEST_PRACTICES.md +468 -0
  87. package/core/tera-system/engineering-governance/ENGINEERING_GOVERNANCE_GATE.md +131 -0
  88. package/core/tera-system/engineering-governance/ENGINEERING_REVIEW_CHECKLIST.md +129 -0
  89. package/core/tera-system/engineering-governance/QUALITY_GATE_THRESHOLDS.md +159 -0
  90. package/core/tera-system/engineering-helpers/engineering-agent-core.md +171 -0
  91. package/core/tera-system/knowledge-base/OPENHANDS_ARCHITECTURE_REFERENCE.md +243 -0
  92. package/core/tera-system/knowledge-base/manufacturing/00_INDEX.md +32 -0
  93. package/core/tera-system/knowledge-base/manufacturing/01_MANUFACTURING_ERP_CORE_CONCEPTS.md +7 -0
  94. package/core/tera-system/knowledge-base/manufacturing/02_SAP_MANUFACTURING_RESEARCH.md +7 -0
  95. package/core/tera-system/knowledge-base/manufacturing/03_DYNAMICS_365_MANUFACTURING_RESEARCH.md +7 -0
  96. package/core/tera-system/knowledge-base/manufacturing/04_ORACLE_MANUFACTURING_RESEARCH.md +7 -0
  97. package/core/tera-system/knowledge-base/manufacturing/05_ODOO_MANUFACTURING_RESEARCH.md +7 -0
  98. package/core/tera-system/knowledge-base/manufacturing/06_ERPNEXT_MANUFACTURING_RESEARCH.md +7 -0
  99. package/core/tera-system/knowledge-base/manufacturing/07_MANUFACTURING_COSTING_GUIDE.md +7 -0
  100. package/core/tera-system/knowledge-base/manufacturing/08_PRODUCTION_DISCOVERY_QUESTIONS.md +7 -0
  101. package/core/tera-system/knowledge-base/manufacturing/09_MANUFACTURING_BLUEPRINT_CHECKLIST.md +7 -0
  102. package/core/tera-system/knowledge-base/manufacturing/10_PRODUCTION_TEST_SCENARIOS.md +7 -0
  103. package/core/tera-system/knowledge-base/manufacturing/11_QUALITY_REWORK_AND_SCRAP_GUIDE.md +7 -0
  104. package/core/tera-system/knowledge-base/manufacturing/12_MRP_AND_PLANNING_GUIDE.md +7 -0
  105. package/core/tera-system/knowledge-base/manufacturing/13_LOCAL_AND_REGIONAL_MANUFACTURING_CONTEXT.md +7 -0
  106. package/core/tera-system/knowledge-base/manufacturing/14_VENDOR_COMPARISON_MATRIX.md +7 -0
  107. package/core/tera-system/product-standards/maintenance-apps/BEST_PRACTICES_DOMAIN.md +325 -0
  108. package/core/tera-system/product-standards/maintenance-apps/STANDARD_DEFINITION.md +142 -0
  109. package/core/tera-system/profiles/PROFILES_INDEX.md +57 -0
  110. package/core/tera-system/profiles/TEMPLATE.md +47 -0
  111. package/core/tera-system/profiles/dotnet-blazor-ef.md +76 -0
  112. package/core/tera-system/profiles/dotnet-razorpages-adonet.md +137 -0
  113. package/core/tera-system/profiles/dotnet-wpf-sqlite.md +159 -0
  114. package/core/tera-system/profiles/effect-bun-opencode.md +109 -0
  115. package/core/tera-system/profiles/flutter-mobile.md +369 -0
  116. package/core/tera-system/profiles/nextjs-prisma.md +110 -0
  117. package/core/tera-system/profiles/phaser-react-node.md +302 -0
  118. package/core/tera-system/profiles/react-pwa.md +97 -0
  119. package/core/tera-system/runtime/CLIENT_DISCOVERY_PROTOCOL.md +145 -0
  120. package/core/tera-system/runtime/DOMAIN_INTELLIGENCE_PROTOCOL.md +124 -0
  121. package/core/tera-system/runtime/MVP_DEFINITION_PROTOCOL.md +176 -0
  122. package/core/tera-system/runtime/TERA_RUNTIME_CHECKLISTS.md +646 -0
  123. package/core/tera-system/runtime/TERA_RUNTIME_PROTOCOLS.md +50 -0
  124. package/core/tera-system/runtime/TERA_RUNTIME_PROTOCOLS_CLIENT.md +355 -0
  125. package/core/tera-system/runtime/TERA_RUNTIME_PROTOCOLS_CORE.md +799 -0
  126. package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES.md +908 -0
  127. package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md +584 -0
  128. package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES_PREPARATION.md +376 -0
  129. package/core/tera-system/runtime/TERA_SOLUTION_PREPARATION_PROTOCOL.md +335 -0
  130. package/core/tera-system/runtime/TERA_SOLUTION_PREPARATION_TEMPLATES.md +397 -0
  131. package/core/tera-system/runtime/VERSION_LIFECYCLE_PROTOCOL.md +296 -0
  132. package/core/tera-system/semgrep-rules/README.md +32 -0
  133. package/core/tera-system/semgrep-rules/tera-security.yml +66 -0
  134. package/core/tera-system/semgrep-rules/tera-standards.yml +49 -0
  135. package/core/tera-system/teranoo-ui/README.md +48 -0
  136. package/core/tera-system/teranoo-ui/components/button.tsx +51 -0
  137. package/core/tera-system/teranoo-ui/components/card.tsx +49 -0
  138. package/core/tera-system/teranoo-ui/components/dashboard-layout.tsx +36 -0
  139. package/core/tera-system/teranoo-ui/components/data-table.tsx +146 -0
  140. package/core/tera-system/teranoo-ui/components/empty-state.tsx +31 -0
  141. package/core/tera-system/teranoo-ui/components/kpi-card.tsx +42 -0
  142. package/core/tera-system/teranoo-ui/components/page-header.tsx +25 -0
  143. package/core/tera-system/teranoo-ui/components/search-input.tsx +40 -0
  144. package/core/tera-system/teranoo-ui/components/sidebar.tsx +66 -0
  145. package/core/tera-system/teranoo-ui/components/stats-card.tsx +37 -0
  146. package/core/tera-system/teranoo-ui/registry.json +77 -0
  147. package/core/tera-system/teranoo-ui/styles/teranoo-theme.css +61 -0
  148. package/opencode.tera.example.json +30 -0
  149. package/package.json +37 -0
  150. package/scripts/build.mjs +110 -0
  151. package/scripts/install.js +244 -0
  152. package/scripts/lib/license.mjs +90 -0
  153. package/scripts/lib/public-key.pem +3 -0
  154. package/scripts/tera-license.mjs +63 -0
  155. package/tools/tera-clean.ps1 +97 -0
  156. package/tools/tera-fetch.ps1 +165 -0
  157. package/tools/tera-release.ps1 +96 -0
  158. package/tools/tera-schedule.ps1 +59 -0
  159. package/tools/tera-update.ps1 +472 -0
  160. package/tools/tera-watch.ps1 +154 -0
  161. package/tools/update-client-repositories.ps1 +92 -0
@@ -0,0 +1,908 @@
1
+ # Tera Runtime Templates
2
+
3
+ These templates are official runtime support material for **Tera Agent (Engineering Delivery Lead — phases 5–7)**.
4
+ Use them when the compact runtime file requests a formal output format.
5
+
6
+ **Runtime Split:** SCP-2026-07-28-118 (2026-07-28)
7
+ **Phase 1–4 templates moved to:** `tera-system/runtime/TERA_SOLUTION_PREPARATION_TEMPLATES.md` (لـ مُهندس)
8
+ **Split Plan:** §11–26 (discovery/client templates) remain as shared reference for TCEA/Mُهندس/Tera cross-context. Planned future split: move §11–17 to solution-preparation templates, final target ≤1,000 lines.
9
+
10
+ Authority rule:
11
+ If this file conflicts with `.opencode/agents/tera.md`, the active runtime file wins until the conflict is reviewed and corrected.
12
+
13
+ ---
14
+
15
+ ## 1. Tera Decision
16
+
17
+ ```text
18
+ Tera Decision:
19
+ System files: tera-system is read-only during project execution.
20
+ Project output path: project-preparation/
21
+ Generated agents path: generated-agents/opencode/
22
+ Files to create: ...
23
+ Files not needed now: ...
24
+ Sub-agents to generate: ...
25
+ Sub-agents not needed now: ...
26
+ Reason: ...
27
+ Next step: ...
28
+ ```
29
+
30
+ ---
31
+
32
+ ## 2. Delegation Context Format
33
+
34
+ For every delegated task, specify:
35
+
36
+ ```text
37
+ Task ID:
38
+ Requested Agent:
39
+ Stage:
40
+ Objective:
41
+ Context Type:
42
+ Reference Files:
43
+ Required Sections:
44
+ Allowed Write Targets:
45
+ Forbidden Files / Actions:
46
+ Token Budget: Low / Medium / High / Critical
47
+ Model Tier Recommendation: Light / Medium / Strong
48
+ Minimum Acceptable Model Tier: Light / Medium / Strong
49
+ Current Model Assessment: sufficient / acceptable with safeguards / stronger recommended / stronger required / split first
50
+ Cost Note: no user approval needed / user approval recommended / user approval required
51
+ Reason:
52
+ Expected Output Limit:
53
+ Acceptance Criteria:
54
+ Return Status Required:
55
+ ```
56
+
57
+ > **ملاحظة حوكمة — تفويض المدققين (qa-agent / auditor / مراجع مستقل — SCP-2026-08-16-001):**
58
+ > تُشارَك Acceptance Criteria كما هي، لكن **تُمنع أي نتائج متوقعة** في التفويض: حجم diff، نتائج build/lint، PASS متوقع، ما لم يتغير.
59
+ > المدقق يكتشف النطاق الفعلي بنفسه (`git status` / `git diff`). تقرير المنفذ Context فقط — ليس Evidence.
60
+ > القاعدة المركزية: **المدقق يجب أن يكون قادراً على الوصول إلى FAIL لم يكن TeraAgent يتوقعه أصلًا.**
61
+
62
+ ---
63
+
64
+ ## 3. Model Capability Assessment
65
+
66
+ ```text
67
+ Model Capability Assessment
68
+ Current Model: [name or "current runtime model"]
69
+ Task Complexity: [Low/Medium/High/Critical]
70
+ Risk Level: [Low/Medium/High/Critical]
71
+ Required Reasoning: [Low/Medium/High/Critical]
72
+ Context Size: [Low/Medium/High/Critical]
73
+ Verification Difficulty: [Low/Medium/High/Critical]
74
+ Historical Fit: [Good/Mixed/Weak/Unknown]
75
+ Recommended Model Tier: [Light/Medium/Strong]
76
+ Minimum Acceptable Model Tier: [Light/Medium/Strong]
77
+ Cost-Saving Option: [use weaker model / split task / reduce context / shorten output / not recommended]
78
+ User-Facing Recommendation Required: [Yes/No]
79
+ Decision: [sufficient / acceptable with safeguards / stronger recommended / stronger required / split]
80
+ Reason: [short reason]
81
+ Required Safeguards: [list]
82
+ User Approval Needed: Yes / No
83
+ Notes: [short notes]
84
+ ```
85
+
86
+ Rules:
87
+ - Never claim a model is guaranteed or 100% capable.
88
+ - Use the weakest sufficient model that preserves safety, traceability, and quality.
89
+ - Ask the user about stronger models only when the risk, cost, or verification difficulty justifies it.
90
+
91
+ ---
92
+
93
+ ## 4. Tera Self-Diagnosis Record
94
+
95
+ For major delegation, phase transition, new agent activation, or risky decision, record briefly:
96
+
97
+ ```text
98
+ Tera Self-Diagnosis: PASS / UNCLEAR / BLOCKED
99
+ Reason:
100
+ Action:
101
+ ```
102
+
103
+ ---
104
+
105
+ ## 5. Emergency Report
106
+
107
+ ```text
108
+ Emergency Report
109
+ Level:
110
+ Incident:
111
+ Affected files/areas:
112
+ Likely cause:
113
+ Current containment status:
114
+ Recommended action:
115
+ User approval required: Yes / No
116
+ ```
117
+
118
+ ---
119
+
120
+ ## 6. Contradiction Detected Notice
121
+
122
+ ```text
123
+ Tera Decision Needed: Contradiction Detected
124
+
125
+ Source A:
126
+ Source B:
127
+ Conflict:
128
+ Risk if A is followed:
129
+ Risk if B is followed:
130
+
131
+ Please choose:
132
+ A. [summary]
133
+ B. [summary]
134
+
135
+ Until resolved, I will hold the affected task.
136
+ ```
137
+
138
+ ---
139
+
140
+ ## 7. Task Prioritization Record
141
+
142
+ For non-obvious task selection decisions, record briefly:
143
+
144
+ ```text
145
+ Selected next task:
146
+ Reason:
147
+ Skipped ready tasks:
148
+ ```
149
+
150
+ ---
151
+
152
+ ## 8. Domain Research Brief
153
+
154
+ Use this before any source-grounded domain research. No open-ended domain research is allowed without this brief.
155
+
156
+ ```text
157
+ Domain Research Brief
158
+
159
+ Topic:
160
+ Domain:
161
+ Project context:
162
+ Research objective:
163
+ Allowed sources:
164
+ Forbidden sources:
165
+ Reference systems:
166
+ Depth: Low / Medium / High
167
+ Output limit:
168
+ Required focus:
169
+ Excluded topics:
170
+ Return format:
171
+ ```
172
+
173
+ ---
174
+
175
+ ## 9. Domain Research Report
176
+
177
+ ```text
178
+ Domain Research Report
179
+
180
+ Topic:
181
+ Domain:
182
+ Sources used:
183
+ Source tier:
184
+ Key findings:
185
+ Common workflows:
186
+ Common fields:
187
+ Common business rules:
188
+ Common roles:
189
+ Integration points:
190
+ Risks / caveats:
191
+ Conflicting findings:
192
+ Source confidence:
193
+ ```
194
+
195
+ ---
196
+
197
+ ## 10. Domain Intelligence Report (Software Mode)
198
+
199
+ Software Mode template — يُستخدم عندما يستدعي TeraAgent الـ DomainExpertAgent لتحليل مجال وتصنيفه حسب MVP.
200
+
201
+ ```text
202
+ Domain Intelligence Report (Software)
203
+
204
+ Topic:
205
+ Domain:
206
+ Project size:
207
+ Reference style:
208
+ Sources used:
209
+
210
+ Core concept:
211
+ Business purpose:
212
+ Workflow:
213
+ Recommended fields:
214
+ Business rules:
215
+ Validation rules:
216
+ Roles and permissions:
217
+ Statuses:
218
+ Integration points:
219
+ Reports / outputs:
220
+ Risks if ignored:
221
+
222
+ MVP recommendation:
223
+ Include now:
224
+ Recommended:
225
+ Defer:
226
+ Out of Scope:
227
+ Needs User Decision:
228
+
229
+ Anti-bloat notes:
230
+ Tera decision recommendation:
231
+ ```
232
+
233
+ ---
234
+
235
+ ## 10.1 Domain Intelligence Report (Consulting Mode)
236
+
237
+ Consulting Mode template — يُستخدم عندما يستدعي TCEA الـ DomainExpertAgent لتحليل مجال وإنتاجه بتصنيف معرفي.
238
+
239
+ ```text
240
+ Domain Intelligence Report (Consulting)
241
+
242
+ Topic:
243
+ Domain:
244
+ Mode: consulting
245
+ Date:
246
+ Requested by: TCEA — [client name if available]
247
+ Sources Used:
248
+ [R01, R02, ... or specific report titles]
249
+
250
+ Domain Overview:
251
+ [نظرة عامة على المجال ونطاقه]
252
+
253
+ Core Processes:
254
+ [العمليات الأساسية — جوهر المجال]
255
+ - Process 1 [مصدر: R01]
256
+ - Process 2 [مصدر: R02]
257
+
258
+ Supporting Activities:
259
+ [الأنشطة المساندة — تدعم العمليات الأساسية]
260
+ - Activity 1 [مصدر: R01]
261
+
262
+ Structural Elements:
263
+ [العناصر الهيكلية والتنظيمية — أدوار، أقسام، هيكليات]
264
+ - Element 1 [مصدر: R03]
265
+
266
+ Contextual Knowledge:
267
+ [المعلومات السياقية — تاريخ، اتجاهات، معلومات خلفية]
268
+ - Knowledge 1 [مصدر: R02]
269
+
270
+ Cross-Cutting Topics:
271
+ [المواضيع العرضية — تمس عدّة أقسام]
272
+ - Topic 1 [مصدر: R01, R02]
273
+
274
+ Relationships & Dependencies:
275
+ [العلاقات والترابطات بين العناصر]
276
+
277
+ Risks & Considerations:
278
+ [المخاطر والاعتبارات التي ظهرت من التحليل]
279
+
280
+ ---
281
+ This report contains [Research Hint] information.
282
+ Does NOT define scope, pricing, or commitments.
283
+ ```
284
+
285
+ ---
286
+
287
+ ## 10.2 Knowledge Structure (Consulting Mode)
288
+
289
+ Consulting Mode template — هيكل هرمي للمعرفة (3 مستويات كحد أقصى)، يصنف كل عنصر حسب التصنيف المعرفي ويربطه بمصدره.
290
+
291
+ ```text
292
+ Knowledge Structure
293
+
294
+ Domain:
295
+ Study Title:
296
+ Date:
297
+ Classification Key: [Core] Core Process / [Supp] Supporting Activity / [Str] Structural Element / [Ctx] Contextual Knowledge / [CC] Cross-Cutting
298
+
299
+ 1. [Chapter 1 Title — المعرف الأساسي في المجال]
300
+ 1.1 [Section 1.1]
301
+ - [Part / Topic 1] — [Core/Supp/Str/Ctx/CC] — مصدر: [R01]
302
+ - [Part / Topic 2] — [Core/Supp/Str/Ctx/CC] — مصدر: [R02]
303
+ 1.2 [Section 1.2]
304
+ - [Part / Topic] — [Core/Supp/Str/Ctx/CC] — مصدر: [R01]
305
+
306
+ 2. [Chapter 2 Title]
307
+ 2.1 [Section 2.1]
308
+ - [Part / Topic] — [Core/Supp/Str/Ctx/CC] — مصدر: [R03]
309
+ 2.2 [Section 2.2]
310
+ - [Part / Topic] — [Core/Supp/Str/Ctx/CC] — مصدر: [R01, R02]
311
+
312
+ N. [Chapter N Title — المواضيع العرضية / المشتركة]
313
+ N.1 [Section N.1]
314
+ - [Part / Topic] — [CC] — مصدر: [R01, R02, R03]
315
+
316
+ ---
317
+
318
+ Structural Notes:
319
+ - Chapters follow logical domain progression: core processes → supporting → structural → contextual
320
+ - Cross-cutting topics can be a separate chapter or distributed
321
+ - Max depth: 3 levels (Chapter → Section → Part/Topic)
322
+ - Every element references its source report
323
+ ```
324
+
325
+ ---
326
+
327
+ ## 10.3 Gap Analysis (Consulting Mode)
328
+
329
+ Consulting Mode template — تحليل الفجوات في المعرفة بعد مقارنة جميع التقارير البحثية مع ما تحتاجه الدراسة.
330
+
331
+ ```text
332
+ Gap Analysis
333
+
334
+ Domain:
335
+ Date:
336
+ Sources analyzed: [R01, R02, ...]
337
+
338
+ Coverage Summary:
339
+ - Fully covered: [X]%
340
+ - Partially covered: [Y]%
341
+ - Missing: [Z]%
342
+
343
+ | # | Topic / Element | Classification | Current Coverage | Gap Description | Priority | Suggested Research | Source |
344
+ |:-:|:---------------|:-------------:|:----------------:|:---------------|:--------:|:-----------------|:------:|
345
+ | 1 | [Topic name] | [Core/Supp/Str/Ctx/CC] | Covered / Partial / Missing | [وصف الفجوة] | H/M/L | [اقتراح بحث إضافي] | R01 |
346
+ | 2 | [Topic name] | [Core/Supp/Str/Ctx/CC] | Covered / Partial / Missing | [وصف الفجوة] | H/M/L | [اقتراح بحث إضافي] | R02 |
347
+
348
+ Priority Legend:
349
+ - H (High): الفجوة تمنع إكمال الدراسة أو تؤثر على جودة المخرجات
350
+ - M (Medium): الفجوة تؤثر على العمق ولكن يمكن تجاوزها مؤقتاً
351
+ - L (Low): الفجوة في معلومات سياقية أو تكميلية
352
+
353
+ Coverage Details:
354
+ - Covered: المعلومة كاملة ومفهومة من المصادر
355
+ - Partial: المعلومة موجودة لكنها ناقصة أو غير مؤكدة — يحتاج توثيقاً إضافياً
356
+ - Missing: لا توجد معلومات — يحتاج بحثاً إضافياً أو استشارة عميل
357
+
358
+ Recommended Next Actions:
359
+ 1. [إجراء مقترح للفجوات عالية الأولوية]
360
+ 2. [إجراء مقترح للفجوات متوسطة الأولوية]
361
+ 3. [إجراء مقترح للفجوات منخفضة الأولوية]
362
+ ```
363
+
364
+ ---
365
+
366
+ ## 11. Application Discovery Notes
367
+
368
+ Use this while collecting and normalizing a new application idea.
369
+
370
+ ```text
371
+ Application Discovery Notes
372
+
373
+ Session date:
374
+ User raw idea summary:
375
+ Normalized application idea:
376
+ Problem / need:
377
+ Target users:
378
+ Main capabilities mentioned:
379
+ User preferences:
380
+ Technical notes:
381
+ Potential domain areas:
382
+ MVP candidates:
383
+ Later candidates:
384
+ Out-of-scope candidates:
385
+ Assumptions:
386
+ Open questions:
387
+ Information documented in:
388
+ ```
389
+
390
+ ---
391
+
392
+ ## 12. Application Understanding Summary
393
+
394
+ Use before leaving discovery or moving to project preparation.
395
+
396
+ ```text
397
+ Application Understanding Summary
398
+
399
+ Application name:
400
+ Core idea:
401
+ Problem solved:
402
+ Target users:
403
+ Primary goals:
404
+ Main workflows:
405
+
406
+ --- Classified Scope (per MVP_DEFINITION_PROTOCOL) ---
407
+ Core MVP (Phase 1A): [features essential for primary workflow]
408
+ Extended MVP (Phase 1B): [important additions, non-blocking]
409
+ Phase 2: [depends on Core MVP stability]
410
+ Phase 3: [advanced capabilities, lower urgency]
411
+ Later / Enterprise: [deferred complex features]
412
+ Out of scope: [explicitly excluded]
413
+
414
+ User preferences:
415
+ Technical context:
416
+ Domain assumptions:
417
+ Open questions:
418
+ Documented files:
419
+ Tera readiness: Ready / Partially Ready / Not Ready
420
+ User confirmation needed: Yes / No
421
+ Feature classification status: Completed / Pending
422
+ ```
423
+
424
+ ---
425
+
426
+ ## 13. Discovery User Confirmation Request
427
+
428
+ ```text
429
+ Discovery Confirmation Request
430
+
431
+ This is my current understanding of the application:
432
+
433
+ [summary]
434
+
435
+ Please confirm one option:
436
+ 1. Approved as the basis for project preparation.
437
+ 2. Mostly correct, with these corrections: ...
438
+ 3. Not correct; continue discovery.
439
+
440
+ Until confirmed, I will not move to project preparation or implementation.
441
+ ```
442
+
443
+ ---
444
+
445
+ ## 14. Research-Based Improvements Review
446
+
447
+ Use after Domain Intelligence or external research changes, improves, or challenges the initial understanding.
448
+
449
+ ```text
450
+ Research-Based Improvements Review
451
+
452
+ Research / domain source:
453
+ What changed or improved:
454
+ Suggested additions:
455
+ Suggested simplifications:
456
+ Suggested deferrals:
457
+ Suggested exclusions:
458
+ Risks if ignored:
459
+ Needs user decision:
460
+ Tera recommendation:
461
+ User decision:
462
+ ```
463
+
464
+ ---
465
+
466
+ ## 15. Phased Application Roadmap
467
+
468
+ Use before execution planning.
469
+
470
+ ```text
471
+ Phased Application Roadmap
472
+
473
+ Phase 1 / MVP:
474
+ Core (Phase 1A):
475
+ - ...
476
+ Extended (Phase 1B):
477
+ - ...
478
+
479
+ Phase 2:
480
+ - ...
481
+
482
+ Phase 3:
483
+ - ...
484
+
485
+ Later / Enterprise:
486
+ - ...
487
+
488
+ Out of scope:
489
+ - ...
490
+
491
+ Needs user decision:
492
+ - ...
493
+
494
+ Approval status: Pending / Approved / Needs Revision
495
+ ```
496
+
497
+ ---
498
+
499
+ ## 16. Final Discovery Approval Summary
500
+
501
+ ```text
502
+ Final Discovery Approval Summary
503
+
504
+ Application understanding: Approved / Needs Revision
505
+ Project inputs documented: Yes / No
506
+ Domain Intelligence applied: Yes / No / Not Needed
507
+ Research-based changes reviewed with user: Yes / No / Not Needed
508
+ Phased roadmap approved: Yes / No
509
+ Remaining open questions:
510
+ Approved next mode: Project Preparation / Continue Discovery / Blocked
511
+ ```
512
+
513
+ ---
514
+
515
+ ## 17. Project Readiness Summary
516
+
517
+ Use after discovery, optional Domain Intelligence, and phased roadmap drafting, before moving into project preparation or execution planning.
518
+
519
+ ```text
520
+ Project Readiness Summary
521
+
522
+ Application understanding:
523
+ Confirmed by user: Yes / No
524
+ Feature classification completed: Yes / No
525
+ Project inputs documented: Yes / No
526
+ Materially important chat-only information remaining: Yes / No
527
+ Domain Intelligence status: Completed / Not Needed / Deferred
528
+ Research-based improvements reviewed: Yes / No / Not Needed
529
+ Approved MVP scope (Core + Extended):
530
+ Approved later phases:
531
+ Out-of-scope items:
532
+ Open questions:
533
+ Risks:
534
+ Next step:
535
+ User approval required: Yes / No
536
+ ```
537
+
538
+ ---
539
+
540
+ ## 18. Client Question Set
541
+
542
+ Use when Majed needs questions to forward to the client.
543
+
544
+ ```text
545
+ Client Question Set
546
+
547
+ Purpose:
548
+ Questions to send to the client:
549
+ 1. ...
550
+ 2. ...
551
+ 3. ...
552
+
553
+ Why these questions matter:
554
+ Expected next step after answers:
555
+ ```
556
+
557
+ ---
558
+
559
+ ## 19. Client Profile Template
560
+
561
+ ```text
562
+ # Client Profile
563
+
564
+ Client name:
565
+ Client type: Individual / Company / Organization / Unknown
566
+ Business domain:
567
+ Default client-facing language: Arabic
568
+ Technical familiarity: Low / Medium / High / Unknown
569
+ Decision style:
570
+ Communication notes:
571
+ Project sensitivity: Low / Medium / High / Critical
572
+ Preferred approval method:
573
+ General notes:
574
+ ```
575
+
576
+ ---
577
+
578
+ ## 20. Client Contacts Template
579
+
580
+ ```text
581
+ # Client Contacts
582
+
583
+ | Name | Role | Decision Authority | Phone | Email | Preferred Channel | Approval Authority | Notes |
584
+ |---|---|---|---|---|---|---|---|
585
+ | | | Decision maker / Reviewer / Technical / Finance / Other | | | | Yes / No / Unknown | |
586
+ ```
587
+
588
+ ---
589
+
590
+ ## 21. Client Approval Package Checklist
591
+
592
+ ```text
593
+ Client Approval Package Checklist
594
+
595
+ Client:
596
+ Application:
597
+ Package path:
598
+
599
+ Required files:
600
+ - 01_CLIENT_PROJECT_BRIEF.md: Present / Missing / Not applicable with reason
601
+ - 02_CLIENT_PROPOSAL.md: Present / Missing / Not applicable with reason
602
+ - 03_SCOPE_OF_WORK.md: Present / Missing / Not applicable with reason
603
+ - 04_FEATURE_SCOPE_MATRIX.md: Present / Missing / Not applicable with reason
604
+ - 05_USER_FLOWS.md: Present / Missing / Not applicable with reason
605
+ - 06_SCREEN_MAP.md: Present / Missing / Not applicable with reason
606
+ - 07_DESIGN_DIRECTION.md: Present / Missing / Not applicable with reason
607
+ - 08_PROTOTYPE_PLAN.md: Present / Missing / Not applicable with reason
608
+ - 09_ACCEPTANCE_CRITERIA.md: Present / Missing / Not applicable with reason
609
+ - 10_CLIENT_APPROVAL_RECORD.md: Present / Missing
610
+ - 11_CHANGE_CONTROL.md: Present / Missing
611
+
612
+ Approval gates:
613
+ - Idea Approval: Approved / Pending / Needs Revision
614
+ - Scope Approval: Approved / Pending / Needs Revision
615
+ - Flow Approval: Approved / Pending / Needs Revision
616
+ - Screen Approval: Approved / Pending / Needs Revision
617
+ - Design Direction Approval: Approved / Pending / Needs Revision
618
+ - Prototype Approval: Approved / Pending / Not Applicable / Needs Revision
619
+ - Execution Authorization: Approved / Pending / Blocked
620
+
621
+ Build Mode allowed: Yes / No
622
+ Reason:
623
+ ```
624
+
625
+ ---
626
+
627
+ ## 22. Client Approval Record
628
+
629
+ ```text
630
+ # Client Approval Record
631
+
632
+ Client:
633
+ Application:
634
+ Approval date:
635
+ Approving contact:
636
+ Approval authority: Confirmed / Unknown / User-confirmed
637
+
638
+ Approved documents:
639
+ - ...
640
+
641
+ Approval gates:
642
+ | Gate | Status | Notes |
643
+ |---|---|---|
644
+ | Idea Approval | | |
645
+ | Scope Approval | | |
646
+ | Flow Approval | | |
647
+ | Screen Approval | | |
648
+ | Design Direction Approval | | |
649
+ | Prototype Approval | | |
650
+ | Execution Authorization | | |
651
+
652
+ Pending decisions:
653
+ Rejected or deferred items:
654
+ Execution authorization status: Approved / Pending / Blocked
655
+ ```
656
+
657
+ ---
658
+
659
+ ## 23. Client Change Request Record
660
+
661
+ ```text
662
+ Change Request
663
+
664
+ Change ID:
665
+ Date:
666
+ Requester:
667
+ Request summary:
668
+ Affected approved file or gate:
669
+ Classification: Clarification / Minor Adjustment / Enhancement / New Scope / Phase 2 / Rejected
670
+ Scope impact:
671
+ Design impact:
672
+ Technical impact:
673
+ Time/cost impact if known:
674
+ Decision: Approve / Defer / Reject / Needs Client Decision
675
+ Approval authority:
676
+ Related task or issue:
677
+ ```
678
+
679
+ ---
680
+
681
+ ## 24. Client Decision Needed
682
+
683
+ ```text
684
+ Client Decision Needed
685
+
686
+ Decision topic:
687
+ Why it matters:
688
+ Options:
689
+ 1. ...
690
+ 2. ...
691
+ 3. ...
692
+
693
+ Tera recommendation:
694
+ Impact if delayed:
695
+ Can implementation continue without this decision? Yes / No
696
+ ```
697
+
698
+ ---
699
+
700
+ ## 25. Client Approval File Outlines
701
+
702
+ Use these outlines when creating files under `clients/.../client-approval/`. Client-facing content is Arabic by default.
703
+
704
+ ### 25.1 `01_CLIENT_PROJECT_BRIEF.md`
705
+
706
+ ```text
707
+ # ملخص فكرة المشروع
708
+
709
+ اسم العميل:
710
+ اسم التطبيق:
711
+ وصف مختصر للمشروع:
712
+ المشكلة التي يحلها:
713
+ المستخدمون المستهدفون:
714
+ الأهداف الرئيسية:
715
+ القيمة المتوقعة للعميل:
716
+ حدود النسخة الأولى:
717
+ ملاحظات أو قرارات معلقة:
718
+ حالة الاعتماد:
719
+ ```
720
+
721
+ ### 25.2 `02_CLIENT_PROPOSAL.md`
722
+
723
+ ```text
724
+ # عرض مشروع
725
+
726
+ مقدمة:
727
+ فهمنا لاحتياج العميل:
728
+ نطاق العمل المقترح:
729
+ المخرجات المتوقعة:
730
+ مراحل العمل:
731
+ ما هو خارج النطاق:
732
+ الافتراضات:
733
+ المتطلبات من العميل:
734
+ آلية الاعتماد والتغييرات:
735
+ حالة الاعتماد:
736
+ ```
737
+
738
+ ### 25.3 `03_SCOPE_OF_WORK.md`
739
+
740
+ ```text
741
+ # نطاق العمل
742
+
743
+ داخل النطاق:
744
+ - ...
745
+
746
+ خارج النطاق:
747
+ - ...
748
+
749
+ مؤجل لمرحلة لاحقة:
750
+ - ...
751
+
752
+ قيود مهمة:
753
+ افتراضات:
754
+ قرارات معلقة:
755
+ حالة الاعتماد:
756
+ ```
757
+
758
+ ### 25.4 `04_FEATURE_SCOPE_MATRIX.md`
759
+
760
+ ```text
761
+ # مصفوفة نطاق الميزات
762
+
763
+ | الميزة | التصنيف | الأولوية | الملاحظات |
764
+ |---|---|---|---|
765
+ | | داخل النطاق / مؤجل / خارج النطاق / يحتاج قرار | عالية / متوسطة / منخفضة | |
766
+
767
+ حالة الاعتماد:
768
+ ```
769
+
770
+ ### 25.5 `05_USER_FLOWS.md`
771
+
772
+ ```text
773
+ # مسارات الاستخدام
774
+
775
+ ## المسار الأول: [الاسم]
776
+
777
+ المستخدم:
778
+ الهدف:
779
+ الخطوات:
780
+ 1. ...
781
+
782
+ الحالات البديلة:
783
+ النتيجة المتوقعة:
784
+
785
+ حالة الاعتماد:
786
+ ```
787
+
788
+ ### 25.6 `06_SCREEN_MAP.md`
789
+
790
+ ```text
791
+ # خريطة الشاشات
792
+
793
+ | الشاشة | الغرض | المستخدمون | ملاحظات |
794
+ |---|---|---|---|
795
+ | | | | |
796
+
797
+ شاشات غير مطلوبة في النسخة الأولى:
798
+ حالة الاعتماد:
799
+ ```
800
+
801
+ ### 25.7 `07_DESIGN_DIRECTION.md`
802
+
803
+ ```text
804
+ # التوجه البصري
805
+
806
+ اللغة والأسلوب العام:
807
+ الألوان أو الهوية:
808
+ مراجع تعجب العميل:
809
+ مراجع لا تعجب العميل:
810
+ انطباع التصميم المطلوب: رسمي / حديث / بسيط / فاخر / شبابي / آخر
811
+ قيود التصميم:
812
+ ما لا يجب استخدامه:
813
+ حالة الاعتماد:
814
+ ```
815
+
816
+ ### 25.8 `08_PROTOTYPE_PLAN.md`
817
+
818
+ ```text
819
+ # خطة البروتوتايب
820
+
821
+ هل البروتوتايب مطلوب؟ نعم / لا
822
+ سبب القرار:
823
+ الشاشات أو التدفقات التي يجب تمثيلها:
824
+ مستوى التفصيل: منخفض / متوسط / عالي
825
+ الأداة المقترحة إن وجدت:
826
+ معايير قبول البروتوتايب:
827
+ حالة الاعتماد:
828
+ ```
829
+
830
+ ### 25.9 `09_ACCEPTANCE_CRITERIA.md`
831
+
832
+ ```text
833
+ # معايير القبول
834
+
835
+ | الميزة أو الشاشة | معيار القبول | طريقة التحقق | الحالة |
836
+ |---|---|---|---|
837
+ | | | | مقبول / يحتاج تعديل / معلق |
838
+
839
+ معايير قبول عامة:
840
+ معايير لا تعتبر ضمن التسليم الحالي:
841
+ حالة الاعتماد:
842
+ ```
843
+
844
+ ### 25.10 `11_CHANGE_CONTROL.md`
845
+
846
+ ```text
847
+ # سجل طلبات التغيير
848
+
849
+ | Change ID | التاريخ | مقدم الطلب | الملخص | التصنيف | القرار | حالة الاعتماد |
850
+ |---|---|---|---|---|---|---|
851
+ | CHG-001 | | | | Clarification / Minor Adjustment / Enhancement / New Scope / Phase 2 / Rejected | | |
852
+
853
+ ملاحظات عامة:
854
+ ```
855
+
856
+ ---
857
+
858
+ ## 26. Client-Facing Application Proposal
859
+
860
+ This is not a text template but an **HTML document**. The proposal is generated as a self-contained HTML page with embedded CSS for professional presentation, RTL support, and print optimization.
861
+
862
+ Reference file: `tera-workshop/APPLICATION_PROPOSAL_TEMPLATE.html`
863
+
864
+ After the Client Discovery + Smart Interview process completes, Tera populates the template with:
865
+ - Application name, date, client name
866
+ - Problem and solution description
867
+ - Users, roles, and permissions
868
+ - Core MVP features and out-of-scope items
869
+ - Requirements by domain (functional, technical, data, design, security, ops)
870
+ - Assumptions table with status
871
+ - Proposed roadmap phases
872
+ - Approval section
873
+
874
+ The generated proposal is saved to:
875
+ - `clients/.../client-approval/` (external clients)
876
+ - `project-inputs/` (internal projects)
877
+
878
+ See `TERA_RUNTIME_PROTOCOLS_CLIENT.md` Section 18, Client Discovery Step 7 for the protocol.
879
+
880
+ ---
881
+
882
+
883
+ ## 27. Project Preparation Plan (Phase 3 Output)
884
+
885
+ > ?? **������� ��� ������ (SCP-2026-07-28-118).** ������ ������ ���� ��:
886
+ > `tera-system/runtime/TERA_SOLUTION_PREPARATION_TEMPLATES.md` �2 � Preparation Plan Template
887
+
888
+ ---
889
+
890
+ ## 28. Agent Delegation Plan (Phase 4 Output)
891
+
892
+ > ?? **������� ��� ������ (SCP-2026-07-28-118).** ������ ������ ���� ��:
893
+ > `tera-system/runtime/TERA_SOLUTION_PREPARATION_TEMPLATES.md` �3 � Agent Delegation Plan Template
894
+
895
+ ---
896
+
897
+ ---
898
+
899
+ ## Split Notice (INSPECTION-2026-08-01 — INS-02)
900
+
901
+ This file now contains **Sections 1–28** (Tera/TCEA core templates).
902
+
903
+ | Split file | Sections | Lines |
904
+ |---|---|---|
905
+ | `TERA_RUNTIME_TEMPLATES_DELIVERY.md` | 29–34 (Execution, Delivery, Closure) | ~505 |
906
+ | `TERA_RUNTIME_TEMPLATES_PREPARATION.md` | 35–40 (TCEA/Blueprint outputs) | ~344 |
907
+
908
+ Update any reference that pointed to Sections 29+ to the new files.