@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,137 @@
1
+ # Technology Profile: dotnet-razorpages-adonet
2
+
3
+ ## 1. Profile Identity
4
+
5
+ - Profile ID: `dotnet-razorpages-adonet`
6
+ - Language: C#
7
+ - Framework: ASP.NET Core Razor Pages (.NET 8 LTS)
8
+ - Database: SQL Server (destination) + Oracle (source, read-only via ODP.NET)
9
+ - ORM: ADO.NET SqlBulkCopy (data loading), Entity Framework Core (config + logs only)
10
+ - Package Manager / CLI: dotnet CLI, NuGet
11
+ - UI Library: Syncfusion (Blazor/Razor components via TagHelpers or JS interop)
12
+ - Default Project Type: Internal business application with data integration
13
+
14
+ ## 2. Applicability
15
+
16
+ Use this profile when:
17
+ - The approved architecture uses ASP.NET Core Razor Pages (not Blazor Server/WebAssembly)
18
+ - The application needs to connect to Oracle as a data source (read-only)
19
+ - Data is loaded into SQL Server via ADO.NET SqlBulkCopy for performance
20
+ - EF Core is used only for application-level configuration and logging
21
+ - The application is deployed on IIS (local or on-premise)
22
+
23
+ This profile covers:
24
+ - ASP.NET Core Razor Pages (server-rendered, not SPA)
25
+ - Oracle.ManagedDataAccess (ODP.NET) for Oracle connectivity
26
+ - ADO.NET SqlBulkCopy for high-performance data transfer
27
+ - EF Core for config/logs tables only
28
+ - Syncfusion components for dashboard/report UI
29
+ - IIS hosting model
30
+
31
+ ## 3. Default Execution Order
32
+
33
+ 1. Scaffold the .NET solution structure (API project + Razor Pages project).
34
+ 2. Add only the required base packages (ODP.NET, EF Core, Syncfusion license key).
35
+ 3. Create config/logs database schema (EF Core entities + migrations).
36
+ 4. Build Oracle connection and data extraction layer (ODP.NET).
37
+ 5. Build SQL Server data loading layer (SqlBulkCopy).
38
+ 6. Build Sync Engine (full refresh + incremental-ready architecture).
39
+ 7. Build Sync Logs and monitoring.
40
+ 8. Build Dashboard layout and rendering (Razor Pages + Syncfusion).
41
+ 9. Build Drill Down and navigation.
42
+ 10. Build Admin Panel (Card CRUD + config).
43
+ 11. Integrate Sync Status display in Dashboard.
44
+ 12. IIS deployment configuration.
45
+
46
+ ## 4. First Task Rule
47
+
48
+ Safe first task:
49
+
50
+ ```text
51
+ Scaffold .NET 8 solution structure with two projects:
52
+ WarehouseDashboard.Api (Console / Worker Service for sync engine)
53
+ WarehouseDashboard.Web (ASP.NET Core Razor Pages)
54
+ + Add base packages: Oracle.ManagedDataAccess.Core, Microsoft.Data.SqlClient,
55
+ Microsoft.EntityFrameworkCore.SqlServer, Syncfusion.Blazor (for license)
56
+ + Verify solution builds cleanly
57
+ ```
58
+
59
+ **Do NOT** in the first task:
60
+ - Add EF Core entities
61
+ - Add migrations or database update
62
+ - Add Oracle connection logic
63
+ - Add any business logic
64
+ - Add any UI rendering
65
+ - Add authentication/authorization
66
+
67
+ ## 5. Scaffold Rules
68
+
69
+ - Use `dotnet new razor` for the Web project, `dotnet new console` or `dotnet new webapi` for the API project.
70
+ - Solution file should be at root with two project references.
71
+ - Keep the first task limited to project structure and minimum approved packages.
72
+ - Syncfusion license key is set via `Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense()` in `Program.cs`.
73
+ - IIS hosting: configure `appsettings.json` with `"Urls": "http://localhost:5000"` as default, configurable via IIS.
74
+
75
+ ## 6. ORM / Database Rules
76
+
77
+ **Entity Framework Core (Config + Logs only):**
78
+ - Used exclusively for `WarehouseDashboardDbContext` with Config entities (CardConfig, DataSourceConfig, etc.) and Log entities (SyncLog, ErrorLog, etc.).
79
+ - `dotnet ef migrations add` belongs to a separate migration task.
80
+ - `dotnet ef database update` is forbidden unless the task is explicitly a database apply task.
81
+ - Do not use EF Core for Oracle data entities or bulk operations.
82
+
83
+ **ADO.NET / SqlBulkCopy (Data Loading):**
84
+ - Used for all Oracle-to-SQL Server data transfer.
85
+ - SqlBulkCopy belongs to a dedicated data-loading task.
86
+ - Oracle connection is via `Oracle.ManagedDataAccess.Client.OracleConnection`.
87
+ - Full Refresh = DELETE all rows + SqlBulkCopy.WriteToServer in single transaction.
88
+ - Incremental Sync ready architecture = track LastSyncTimestamp, support Upsert pattern.
89
+
90
+ **Oracle (Read-Only Source):**
91
+ - ODP.NET connections are read-only by convention.
92
+ - Oracle table details are deferred — client provides during execution.
93
+ - Oracle Managed Data Access (NuGet: Oracle.ManagedDataAccess.Core).
94
+
95
+ ## 7. CLI Side Effects
96
+
97
+ - `dotnet new razor` creates Razor Pages boilerplate files.
98
+ - `dotnet new console` creates console app boilerplate.
99
+ - `dotnet add package` modifies `.csproj`.
100
+ - `dotnet ef migrations add` creates migration files.
101
+ - `dotnet ef database update` changes database state.
102
+ - `dotnet build` / `dotnet publish` produce output files.
103
+
104
+ ## 8. Forbidden Defaults
105
+
106
+ Do not add by default in the first implementation task:
107
+
108
+ - EF Core entities or DbContext
109
+ - Migrations or database update
110
+ - Oracle connection logic
111
+ - SyncEngine logic
112
+ - Dashboard UI
113
+ - Admin Panel
114
+ - Authentication/Authorization
115
+ - Custom UI styling beyond Syncfusion defaults
116
+ - Repository layer without clear need
117
+ - SignalR or real-time features
118
+ - Background services (unless explicitly delegated)
119
+
120
+ ## 9. Pre-Execution Gate Additions
121
+
122
+ - Confirm scaffold task does not silently add Identity, EF migrations, or extra hosting layers.
123
+ - Confirm ODP.NET is isolated from EF Core DbContext (separate concerns).
124
+ - Confirm SqlBulkCopy tasks are not combined with Oracle extraction tasks unless the task explicitly combines them with approval.
125
+ - Confirm database update commands are isolated in dedicated tasks.
126
+ - Confirm Syncfusion license key is registered before any component usage.
127
+ - Confirm IIS hosting model is configured correctly (no Kestrel-only assumptions).
128
+
129
+ ## 10. Acceptance Criteria Patterns
130
+
131
+ - .NET 8 solution builds cleanly with both projects.
132
+ - Required packages are installed and version-compatible.
133
+ - Solution can be published for IIS deployment (`dotnet publish -c Release`).
134
+ - Oracle connection can be established (tested in dedicated task).
135
+ - SQL Server config/logs schema can be created (tested in dedicated task).
136
+ - No unapproved packages, entities, migrations, or auth were added.
137
+ - No unapproved database changes were applied.
@@ -0,0 +1,159 @@
1
+ # Technology Profile: dotnet-wpf-sqlite
2
+
3
+ > **✅ معتمد من Majed — جاهز للاستخدام في التنفيذ**
4
+
5
+ ## 1. Profile Identity
6
+
7
+ - Profile ID: `dotnet-wpf-sqlite`
8
+ - Language: **C# (.NET 8)**
9
+ - Framework: **WPF (Windows Presentation Foundation)** مع **CommunityToolkit.Mvvm**
10
+ - Database: **SQLite**
11
+ - ORM: **Entity Framework Core** (موصى به) أو **Microsoft.Data.Sqlite** (يدوي)
12
+ - Package Manager / CLI: `dotnet CLI` + `NuGet`
13
+ - Default Project Type: **WPF Application** (`dotnet new wpf`)
14
+ - Template: `dotnet new wpf -n <ProjectName>`
15
+
16
+ ## 2. Applicability
17
+
18
+ يُستخدم هذا البروفايل عندما يكون المشروع:
19
+ - تطبيق **Windows Desktop** (WPF)
20
+ - يعمل **محلياً** (لا سيرفر، لا API)
21
+ - **مستخدم واحد** (أو عدد محدود بصلاحيات بسيطة)
22
+ - مع **SQLite** كقاعدة بيانات
23
+ - مع أو بدون تكامل Outlook
24
+
25
+ لا يُستخدم لـ:
26
+ - تطبيقات Web
27
+ - تطبيقات Mobile
28
+ - تطبيقات متعددة المستخدمين تحتاج سيرفر
29
+
30
+ ## 3. Default Execution Order
31
+
32
+ 1. Scaffold (إنشاء حل WPF + هيكل المشروع)
33
+ 2. إعداد SQLite + Data Layer (Entities + Context + Migrations)
34
+ 3. تطبيق طبقة MVVM (Models ← ViewModels ← Services ← Views)
35
+ 4. شاشة Login (S1)
36
+ 5. شاشة Settings (S2) — الموردين + القطع + التوقيعات + الترويسة
37
+ 6. شاشة Quotation Form (S3) — جوهر التطبيق
38
+ 7. شاشة Quotation List (S4)
39
+ 8. شاشة Reports (S5) — التقارير الأربعة
40
+ 9. طباعة + PDF
41
+ 10. Outlook Integration (اختياري)
42
+ 11. Auto Backup
43
+ 12. اختبار + تسليم
44
+
45
+ ## 4. First Task Rule
46
+
47
+ أول مهمة تنفيذ آمنة:
48
+
49
+ ```text
50
+ TASK-COD-001: Scaffold WPF Project + SQLite Setup
51
+ ```
52
+
53
+ يشمل:
54
+ - `dotnet new wpf` مع هيكل MVVM (Models, ViewModels, Views, Services, Data)
55
+ - إضافة حزمة `CommunityToolkit.Mvvm` و `Microsoft.EntityFrameworkCore.Sqlite`
56
+ - إنشاء ApplicationDbContext + Seed (إن وجد)
57
+ - تطبيق أول Migration
58
+ - التأكد من أن التطبيق يشتغل (Run دون أخطاء)
59
+
60
+ ## 5. Scaffold Rules
61
+
62
+ ```text
63
+ # إنشاء مشروع WPF
64
+ dotnet new wpf -n MyApp -o .\src\MyApp
65
+
66
+ # إضافة الحزم الأساسية
67
+ dotnet add .\src\MyApp\MyApp.csproj package CommunityToolkit.Mvvm
68
+ dotnet add .\src\MyApp\MyApp.csproj package Microsoft.EntityFrameworkCore.Sqlite
69
+ dotnet add .\src\MyApp\MyApp.csproj package QuestPDF # للـ PDF
70
+ dotnet add .\src\MyApp\MyApp.csproj package Microsoft.Office.Interop.Outlook
71
+
72
+ # إنشاء مجلدات الهيكل
73
+ New-Item -ItemType Directory -Path .\src\MyApp\Models, .\src\MyApp\ViewModels, .\src\MyApp\Views, .\src\MyApp\Services, .\src\MyApp\Data
74
+ ```
75
+
76
+ **قيود الـ Scaffold:**
77
+ - لا تنشئ `Views/` افتراضية غير Shutdown
78
+ - لا تعدل `App.xaml` لتغيير StartupUri قبل تجهيز MainWindow
79
+ - لا تنشئ واجهات Login قبل تجهيز منطق المصادقة
80
+ - لا تنشئ أكثر من مشروع واحد في الحل إلا إذا تطلب الأمر
81
+
82
+ ## 6. ORM / Database Rules
83
+
84
+ - **حدود الـ EF Core Migrations:**
85
+ - `Add-Migration <name>` لإنشاء migration
86
+ - `Update-Database` لتطبيقها
87
+ - لا تحذف migration موجودة
88
+ - لا تعدل migration يدوياً إلا لتصحيح خطأ محدد
89
+
90
+ - **Schema:**
91
+ - كل Entity يكون في `Models/`
92
+ - DbSet Properties في `Data/AppDbContext.cs`
93
+ - ConnectionString: `Data Source=MyApp.db` (ملف محلي)
94
+
95
+ - **Database-side Validation:**
96
+ - استخدام Data Annotations (`[Required]`, `[MaxLength]`, إلخ)
97
+ - استخدام Fluent API في `OnModelCreating` للعلاقات
98
+
99
+ - **SQLite Limits:**
100
+ - لا تستخدم Stored Procedures (غير مدعومة)
101
+ - لا تستخدم Types خاصة بـ SQL Server
102
+ - استخدم `HasColumnType` لضبط الأنواع عند الحاجة
103
+
104
+ ## 7. CLI Side Effects
105
+
106
+ | الأمر | التأثير الجانبي |
107
+ |:------|:----------------|
108
+ | `dotnet new wpf` | ينشئ ملف `.csproj` + `App.xaml` + `MainWindow.xaml` |
109
+ | `dotnet add package ...` | يعدّل `.csproj` (إضافة PackageReference) |
110
+ | `dotnet build` | لا تأثير جانبي — آمن |
111
+ | `dotnet run` | لا تأثير جانبي — آمن |
112
+ | `Add-Migration` | ينشئ ملف `.cs` في `Migrations/` |
113
+ | `Update-Database` | ينشئ/يعدّل ملف `SQLite.db` في مجلد المشروع |
114
+ | `dotnet publish` | ينشئ مجلد `publish/` بالمخرجات القابلة للتوزيع |
115
+
116
+ ## 8. Forbidden Defaults
117
+
118
+ ما **يمنع** إنشاؤه افتراضياً بدون طلب صريح:
119
+
120
+ - ❌ **لا** Views إضافية (غير الـ 5 شاشات المطلوبة)
121
+ - ❌ **لا** Admin Panel/Panel إضافي
122
+ - ❌ **لا** صفحات Settings إضافية
123
+ - ❌ **لا** شاشات Reporting إضافية
124
+ - ❌ **لا** إشعارات النظام
125
+ - ❌ **لا** خلفية سيرفر DB (SQL Server, PostgreSQL)
126
+ - ❌ **لا** Docker
127
+ - ❌ **لا** Unit Tests (للمشاريع الصغيرة جداً — يُضاف إذا طُلب)
128
+ - ❌ **لا** API endpoints
129
+ - ❌ **لا** SignalR أو WebSockets
130
+
131
+ ## 9. Pre-Execution Gate Additions
132
+
133
+ بالإضافة إلى `TeraPreExecutionGate.md`، تأكد من:
134
+
135
+ - [ ] ملف `.csproj` لا يحتوي PackageReferences غير ضرورية
136
+ - [ ] WPF لا يستخدم `App.xaml` لتوجيه غير آمن
137
+ - [ ] NuGet packages كلها متوافقة مع .NET 8
138
+ - [ ] ConnectionString لـ SQLite لا تحتوي معلومات حساسة
139
+ - [ ] مجلد `Migrations/` موجود بعد أول مهمة DB
140
+ - [ ] دعم RTL ضمن XAML (FlowDirection)
141
+
142
+ ## 10. Acceptance Criteria Patterns
143
+
144
+ يقبل الـ Handback إذا:
145
+
146
+ - ✅ التطبيق يشتغل بـ `dotnet run` بدون أخطاء
147
+ - ✅ الشاشات تعرض بالعربية (RTL)
148
+ - ✅ SQLite يعمل (قراءة/كتابة/تصدير)
149
+ - ✅ الطباعة تنتج وثيقة A4 صالحة
150
+ - ✅ الـ PDF يُفتح بدون أخطاء
151
+ - ✅ Outlook Integration تعمل إذا Outlook مثبت، وإلا Fallback إلى PDF
152
+ - ✅ البحث والتصفية يعملان في الجداول
153
+ - ✅ التطبيق لا يتعطل عند إدخال بيانات ناقصة
154
+
155
+ ---
156
+
157
+ **إعداد:** TeraAgent (مسودة)
158
+ **تاريخ:** 2026-07-13
159
+ **الحالة:** ✅ **معتمد من Majed** — 2026-07-13
@@ -0,0 +1,109 @@
1
+ # Technology Profile: effect-bun-opencode
2
+
3
+ > **⚠️ مُلغى (Deprecated) منذ 2026-08-15:** هذا البروفايل كان مرتبطاً بمشروع TeraOpenCode/TeraAi التجريبي الذي أُزيل من المستودع. يحتفظ بمعرفة الـ stack (Effect TS + Bun) كمرجع للاستخدام المستقبلي المحتمل — لا يُفعَّل حالياً.
4
+
5
+ ## 1. Profile Identity
6
+
7
+ - Profile ID: `effect-bun-opencode`
8
+ - Language: TypeScript
9
+ - Framework: Effect TS / OpenCode-style monorepo architecture
10
+ - Database: Not applicable for current task
11
+ - ORM: Not applicable
12
+ - Package Manager / CLI: Bun
13
+ - Default Project Type: TypeScript monorepo engine / CLI / core package work
14
+ - Status: **Deprecated** — المشروع المصدر (TeraOpenCode/TeraAi) أُزيل من المستودع 2026-08-15
15
+
16
+ ## 2. Applicability
17
+
18
+ Use this profile for TypeScript monorepo engine work (Effect TS + Bun + OpenCode-style architecture). ملاحظة: كان مرتبطاً بمشروع TeraOpenCode التجريبي (clients/TeraAi) الذي أُزيل من المستودع 2026-08-15 — لا يوجد مسار فعلي حالياً.
19
+
20
+ This profile is intended for the current Phase 4 Context API prototype and similar engine-integration tasks.
21
+
22
+ ## 3. Default Execution Order
23
+
24
+ 1. Read the approved protocol/design documents.
25
+ 2. Identify the smallest package-level integration point.
26
+ 3. Add or modify schemas/types before runtime behavior when needed.
27
+ 4. Implement the minimal runtime path.
28
+ 5. Register only the minimal exported surface required by the task.
29
+ 6. Run package-local checks only, not repo-root tests.
30
+ 7. Report changed files, commands, and verification results.
31
+
32
+ ## 4. First Task Rule
33
+
34
+ The safest first implementation task is a narrow, non-state-changing prototype that validates protocol shape and message handling without adding Task API, Approval API, Event Stream, Config Bridge, or persistent platform state.
35
+
36
+ For Phase 4.2, the first allowed implementation is: Handshake + ContextRequest + ContextResponse over JSON Lines stdio, scoped to a prototype entrypoint or gateway module.
37
+
38
+ ## 5. Scaffold Rules
39
+
40
+ - Do not scaffold a new application.
41
+ - Do not add a new framework.
42
+ - Do not add runtime dependencies unless explicitly required and approved.
43
+ - Prefer existing repository patterns for TypeScript modules, exports, schemas, and service registration.
44
+ - Keep files close to the relevant package boundary.
45
+
46
+ ## 6. ORM / Database Rules
47
+
48
+ Not applicable for the current engine gateway prototype.
49
+
50
+ Forbidden by default:
51
+ - Database schema changes
52
+ - Migrations
53
+ - ORM configuration
54
+ - Persistent task/session storage
55
+
56
+ ## 7. CLI Side Effects
57
+
58
+ Allowed commands must be package-local and explicitly listed in the task file.
59
+
60
+ Common allowed verification commands:
61
+ - `bun run typecheck` from the relevant package directory when available
62
+ - package-local tests if a test script exists and is scoped
63
+
64
+ Forbidden by default unless separately approved:
65
+ - repo-wide destructive cleanup
66
+ - dependency installation
67
+ - publishing
68
+ - migration or database commands
69
+ - force push / amend / reset
70
+ - starting long-running servers unless the task explicitly requires it
71
+
72
+ ## 8. Forbidden Defaults
73
+
74
+ Do not create by default:
75
+ - Task API
76
+ - Approval API
77
+ - Event Stream
78
+ - REST API
79
+ - Config Bridge
80
+ - persistent platform state
81
+ - new agent files
82
+ - broad refactors
83
+ - unrelated renames
84
+ - new dependencies
85
+
86
+ ## 9. Pre-Execution Gate Additions
87
+
88
+ Before delegation:
89
+
90
+ - Confirm `TERA_GATEWAY_PROTOCOL_SPEC.md` version and status.
91
+ - Confirm the task is limited to Context API prototype.
92
+ - Confirm stdout/stderr rules are included in acceptance criteria.
93
+ - Confirm no `.tera-workspace/` writes are allowed.
94
+ - Confirm `read_tera_workspace` remains fallback only and is not removed.
95
+ - Confirm allowed write targets are package-specific.
96
+ - Confirm no Task State changes are introduced.
97
+
98
+ ## 10. Acceptance Criteria Patterns
99
+
100
+ For the Phase 4.2 Context API prototype:
101
+
102
+ 1. Handshake accepts compatible `contract_version` and rejects incompatible versions.
103
+ 2. ContextRequest is accepted only after successful handshake.
104
+ 3. ContextResponse uses the same correlation `id` as ContextRequest.
105
+ 4. stdout emits protocol JSON Lines only.
106
+ 5. stderr is used for diagnostics/logs only.
107
+ 6. Oversized context is rejected according to `MESSAGE_TOO_LARGE` behavior.
108
+ 7. No Task API, Approval API, Event Stream, Config Bridge, or platform state mutation is added.
109
+ 8. Typecheck or scoped verification passes.