@tera-system/core 0.2.2 → 0.2.4

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 (46) hide show
  1. package/MANIFEST.json +7 -5
  2. package/README.md +26 -0
  3. package/RELEASES.md +32 -0
  4. package/WELCOME.md +7 -0
  5. package/agents/tera-client-engagement.md +1 -0
  6. package/assets/project-control/TeraPricingCalculator.xlsx +0 -0
  7. package/assets/tera-workshop/client-templates/branding/Discovery Template.html +1187 -0
  8. package/assets/tera-workshop/client-templates/branding/footer.png +0 -0
  9. package/assets/tera-workshop/client-templates/branding/header.png +0 -0
  10. package/assets/tera-workshop/client-templates/branding/letterhead-master-fixed-print.html +361 -0
  11. package/assets/tera-workshop/client-templates/branding/teranoo-logo.png +0 -0
  12. package/assets/tera-workshop/client-templates/commercial/APPLICATION_PROPOSAL_TEMPLATE.md +196 -0
  13. package/assets/tera-workshop/client-templates/commercial/DRAFT_QUOTATION_TEMPLATE.md +101 -0
  14. package/assets/tera-workshop/client-templates/commercial/PROJECT_CHARTER_TEMPLATE.md +123 -0
  15. package/assets/tera-workshop/client-templates/commercial/QUOTATION_TEMPLATE.md +139 -0
  16. package/assets/tera-workshop/client-templates/commercial/SCOPE_OF_WORK_TEMPLATE.md +124 -0
  17. package/assets/tera-workshop/client-templates/commercial/SCOPE_SUMMARY_TEMPLATE.md +106 -0
  18. package/assets/tera-workshop/client-templates/commercial/TECHNICAL_PROPOSAL_TEMPLATE.md +106 -0
  19. package/assets/tera-workshop/client-templates/contractual/CHANGE_REQUEST_FORM.md +83 -0
  20. package/assets/tera-workshop/client-templates/contractual/PROTOTYPE_APPROVAL_LETTER_TEMPLATE.md +91 -0
  21. package/assets/tera-workshop/client-templates/contractual/SLA_TEMPLATE.md +67 -0
  22. package/assets/tera-workshop/client-templates/contractual/SOFTWARE_SERVICES_AGREEMENT_TEMPLATE.md +170 -0
  23. package/assets/tera-workshop/client-templates/contractual/STATUS_REPORT_TEMPLATE.md +84 -0
  24. package/assets/tera-workshop/client-templates/handover/CLIENT_SATISFACTION_SURVEY_TEMPLATE.md +61 -0
  25. package/assets/tera-workshop/client-templates/handover/COMPLETION_CERTIFICATE_TEMPLATE.md +50 -0
  26. package/assets/tera-workshop/client-templates/handover/HANDOVER_REPORT_TEMPLATE.md +80 -0
  27. package/assets/tera-workshop/client-templates/pre-contract/CLIENT_BRIEF_TEMPLATE.md +133 -0
  28. package/assets/tera-workshop/client-templates/pre-contract/CLIENT_INTAKE_FORM.md +92 -0
  29. package/assets/tera-workshop/client-templates/pre-contract/GAP_ANALYSIS_TEMPLATE.md +46 -0
  30. package/assets/tera-workshop/client-templates/pre-contract/MEETING_REPORT_TEMPLATE.md +87 -0
  31. package/assets/tera-workshop/client-templates/pre-contract/NDA_TEMPLATE.md +74 -0
  32. package/assets/tera-workshop/client-templates/pre-contract/RISK_REGISTER_TEMPLATE.md +46 -0
  33. package/assets/tera-workshop/client-templates/pre-contract/USER_PERSONA_MATRIX_TEMPLATE.md +73 -0
  34. package/core/tera-system/AGENT_DEPENDENCY_MAP.md +21 -24
  35. package/core/tera-system/TERA_DISTRIBUTION_POLICY.md +27 -27
  36. package/core/tera-system/TeraArchitectureMap.md +2 -2
  37. package/core/tera-system/TeraClientPolicy.md +2 -2
  38. package/core/tera-system/TeraPolicyMap.md +2 -2
  39. package/core/tera-system/TeraPricingPolicy.md +18 -0
  40. package/core/tera-system/client-helpers/tera-client-engagement-discovery-domains.md +4 -3
  41. package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES.md +1 -1
  42. package/core/tera-system/runtime/TERA_RUNTIME_TEMPLATES_PREPARATION.md +4 -2
  43. package/core/tera-system/runtime/VERSION_LIFECYCLE_PROTOCOL.md +1 -1
  44. package/package.json +6 -1
  45. package/scripts/build.mjs +2 -0
  46. package/scripts/install.js +4 -0
@@ -113,22 +113,22 @@ Release Package (ملفات Tera-managed + SHA256SUMS + TERA_RELEASE_MANIFEST.js
113
113
 
114
114
  | الأداة | المسار | الوظيفة |
115
115
  |---|---|---|
116
- | `tera-fetch.ps1` | `tera-workshop/tools/` | جلب الإصدارات من المستودع الأصلي (List) + بناء حزمة متحققة (Fetch) |
117
- | `tera-update.ps1` | `tera-workshop/tools/` | تحديث مستودع عميل **واحد** — وضعا Plan و Apply |
118
- | `update-client-repositories.ps1` | `tera-workshop/tools/` | تحديث **دفعات** من المستودعات — وضعا Plan و Apply |
119
- | `tera-release.ps1` | `tera-workshop/tools/` | بناء حزمة إصدار متحقق منها من Tag + Manifest + SHA256SUMS |
116
+ | `tera-fetch.ps1` | `tools/` | جلب الإصدارات من المستودع الأصلي (List) + بناء حزمة متحققة (Fetch) |
117
+ | `tera-update.ps1` | `tools/` | تحديث مستودع عميل **واحد** — وضعا Plan و Apply |
118
+ | `update-client-repositories.ps1` | `tools/` | تحديث **دفعات** من المستودعات — وضعا Plan و Apply |
119
+ | `tera-release.ps1` | `tools/` | بناء حزمة إصدار متحقق منها من Tag + Manifest + SHA256SUMS |
120
120
 
121
121
  ### 4.1 tera-fetch.ps1 — الجلب من المستودع الأصلي
122
122
 
123
123
  ```powershell
124
124
  # عرض الإصدارات المتاحة في المستودع الأصلي
125
- pwsh .\tera-workshop\tools\tera-fetch.ps1 -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem" -List
125
+ pwsh .\tools\tera-fetch.ps1 -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem" -List
126
126
 
127
127
  # فحص: هل يوجد إصدار أحدث من المثبت حالياً؟ (قراءة فقط — لا يعدّل شيئاً)
128
- pwsh .\tera-workshop\tools\tera-fetch.ps1 -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem" -Check -RepoPath "D:\My Projects\TeraWebsite"
128
+ pwsh .\tools\tera-fetch.ps1 -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem" -Check -RepoPath "D:\My Projects\TeraWebsite"
129
129
 
130
130
  # بناء حزمة إصدار موثقة من المستودع الأصلي
131
- pwsh .\tera-workshop\tools\tera-fetch.ps1 -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem" -Version tera-v2.5.0 -Channel stable -OutPath "C:\TeraReleases\tera-v2.5.0"
131
+ pwsh .\tools\tera-fetch.ps1 -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem" -Version tera-v2.5.0 -Channel stable -OutPath "C:\TeraReleases\tera-v2.5.0"
132
132
  ```
133
133
 
134
134
  **وضع Check:** يقارن الإصدار المثبت في `lock.json` بأحدث إصدار في الأصل، ويخبرك بما يلي:
@@ -144,47 +144,47 @@ pwsh .\tera-workshop\tools\tera-fetch.ps1 -RepositoryUrl "https://github.com/Ala
144
144
 
145
145
  ```powershell
146
146
  # تسجيل مهمة Windows Task Scheduler (عند تسجيل الدخول + كل 6 ساعات)
147
- pwsh .\tera-workshop\tools\tera-schedule.ps1 `
147
+ pwsh .\tools\tera-schedule.ps1 `
148
148
  -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem.git" `
149
149
  -RepoPath "D:\My Projects\TeraWebsite"
150
150
 
151
151
  # إزالة المهمة
152
- pwsh .\tera-workshop\tools\tera-schedule.ps1 -Unregister
152
+ pwsh .\tools\tera-schedule.ps1 -Unregister
153
153
  ```
154
154
 
155
155
  السلوك:
156
156
  - عند وجود إصدار أحدث → **Windows Toast** أصلي يظهر على سطح المكتب + ملف `.tera/update-status.json` يُحدَّث.
157
157
  - ملف الحالة قابل للقراءة من أي جلسة (بما فيها OpenCode) لمعرفة `updateAvailable`.
158
- - تشغيل يدوي لمرة واحدة: `pwsh .\tera-workshop\tools\tera-watch.ps1 -RepositoryUrl "..." -RepoPath "..." -Once`
158
+ - تشغيل يدوي لمرة واحدة: `pwsh .\tools\tera-watch.ps1 -RepositoryUrl "..." -RepoPath "..." -Once`
159
159
  - رموز الخروج: 0 = محدّث، 2 = يوجد تحديث، 1 = خطأ.
160
160
 
161
161
  ### 4.2 tera-update.ps1 — أوامر
162
162
 
163
163
  ```powershell
164
164
  # فحص جاف من حزمة محلية
165
- pwsh .\tera-workshop\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Plan -SourcePath "C:\TeraReleases\tera-v2.5.0"
165
+ pwsh .\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Plan -SourcePath "C:\TeraReleases\tera-v2.5.0"
166
166
 
167
167
  # فحص جاف مباشرة من المستودع الأصلي (استمداد حي)
168
- pwsh .\tera-workshop\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Plan -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem"
168
+ pwsh .\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Plan -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem"
169
169
 
170
170
  # التنفيذ الفعلي من المستودع الأصلي
171
- pwsh .\tera-workshop\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem"
171
+ pwsh .\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem"
172
172
  ```
173
173
 
174
174
  ### 4.3 tera-release.ps1 — بناء الإصدار
175
175
 
176
176
  ```powershell
177
- pwsh .\tera-workshop\tools\tera-release.ps1 -Version 2.5.0 -Tag tera-v2.5.0 -Channel stable -OutputPath "C:\TeraReleases\tera-v2.5.0"
177
+ pwsh .\tools\tera-release.ps1 -Version 2.5.0 -Tag tera-v2.5.0 -Channel stable -OutputPath "C:\TeraReleases\tera-v2.5.0"
178
178
  ```
179
179
 
180
180
  ينشئ الأمر حزمة مجلدية متحققة تحتوي على `TERA_RELEASE_MANIFEST.json` و`SHA256SUMS` من محتوى الـ Tag نفسه (لا من working tree). يرفض تعارض Version/Tag.
181
181
 
182
182
  مسارات إضافية:
183
183
  ```powershell
184
- pwsh .\tera-workshop\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -RepoPath "C:\clients\CLIENT-X\APP-Y" -SourcePath "C:\TeraReleases\tera-v2.5.0"
184
+ pwsh .\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -RepoPath "C:\clients\CLIENT-X\APP-Y" -SourcePath "C:\TeraReleases\tera-v2.5.0"
185
185
 
186
186
  # التثبيت الأول يحتاج تصريحاً صريحاً
187
- pwsh .\tera-workshop\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -Initialize -SourcePath "C:\TeraReleases\tera-v2.5.0"
187
+ pwsh .\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -Initialize -SourcePath "C:\TeraReleases\tera-v2.5.0"
188
188
  ```
189
189
 
190
190
  ### 4.4 سلوك المُحدِّث (سلسلة تحقق إلزامية)
@@ -206,11 +206,11 @@ pwsh .\tera-workshop\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable
206
206
  ### 4.5 update-client-repositories.ps1 — الدفعات
207
207
 
208
208
  ```powershell
209
- pwsh .\tera-workshop\tools\update-client-repositories.ps1 -Version tera-v2.5.0 -Channel stable -Mode Plan -SourcePath "C:\TeraReleases\tera-v2.5.0" -ReposFile "C:\Tera\client-repositories.txt"
210
- pwsh .\tera-workshop\tools\update-client-repositories.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -SourcePath "C:\TeraReleases\tera-v2.5.0" -ReposFile "C:\Tera\client-repositories.txt"
209
+ pwsh .\tools\update-client-repositories.ps1 -Version tera-v2.5.0 -Channel stable -Mode Plan -SourcePath "C:\TeraReleases\tera-v2.5.0" -ReposFile "C:\Tera\client-repositories.txt"
210
+ pwsh .\tools\update-client-repositories.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -SourcePath "C:\TeraReleases\tera-v2.5.0" -ReposFile "C:\Tera\client-repositories.txt"
211
211
 
212
212
  # دفعات مباشرة من المستودع الأصلي
213
- pwsh .\tera-workshop\tools\update-client-repositories.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem" -ReposFile "C:\Tera\client-repositories.txt"
213
+ pwsh .\tools\update-client-repositories.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem" -ReposFile "C:\Tera\client-repositories.txt"
214
214
  ```
215
215
 
216
216
  - يقبل ملف قائمة مستودعات (سطر لكل مسار) أو JSON بالشكل `{ "repositories": ["..."] }`
@@ -241,19 +241,19 @@ pwsh .\tera-workshop\tools\update-client-repositories.ps1 -Version tera-v2.5.0 -
241
241
  ### الترقية
242
242
  ```powershell
243
243
  # من حزمة محلية
244
- pwsh .\tera-workshop\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Plan -SourcePath "C:\TeraReleases\tera-v2.5.0"
245
- pwsh .\tera-workshop\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -SourcePath "C:\TeraReleases\tera-v2.5.0"
244
+ pwsh .\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Plan -SourcePath "C:\TeraReleases\tera-v2.5.0"
245
+ pwsh .\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -SourcePath "C:\TeraReleases\tera-v2.5.0"
246
246
 
247
247
  # مباشرة من المستودع الأصلي
248
- pwsh .\tera-workshop\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Plan -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem"
249
- pwsh .\tera-workshop\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem"
248
+ pwsh .\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Plan -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem"
249
+ pwsh .\tools\tera-update.ps1 -Version tera-v2.5.0 -Channel stable -Mode Apply -RepositoryUrl "https://github.com/Alabasi1980/TeraSystem"
250
250
  ```
251
251
 
252
252
  ### الاسترجاع (Rollback)
253
253
  ```powershell
254
254
  # العودة إلى إصدار سابق مثبت:
255
- pwsh .\tera-workshop\tools\tera-update.ps1 -Version tera-v2.0.0 -Channel stable -Mode Plan -SourcePath "C:\TeraReleases\tera-v2.0.0"
256
- pwsh .\tera-workshop\tools\tera-update.ps1 -Version tera-v2.0.0 -Channel stable -Mode Apply -SourcePath "C:\TeraReleases\tera-v2.0.0"
255
+ pwsh .\tools\tera-update.ps1 -Version tera-v2.0.0 -Channel stable -Mode Plan -SourcePath "C:\TeraReleases\tera-v2.0.0"
256
+ pwsh .\tools\tera-update.ps1 -Version tera-v2.0.0 -Channel stable -Mode Apply -SourcePath "C:\TeraReleases\tera-v2.0.0"
257
257
  ```
258
258
  - الاسترجاع = تحديث إلى SHA سابق — نفس الآلية، بلا "مسار خاص"
259
259
  - ملفات العميل لا تتأثر إطلاقاً
@@ -265,9 +265,9 @@ pwsh .\tera-workshop\tools\update-client-repositories.ps1 -Version tera-v2.5.0 -
265
265
  | الملف | العلاقة |
266
266
  |---|---|
267
267
  | `tera-system/TeraPolicyMap.md` | يوثّق هذه السياسة كمصدر حقيقة لموضوع التوزيع |
268
- | `tera-system/TeraArchitectureMap.md` | يوضّح طبقة التوزيع ودور `tera-workshop/tools/` |
268
+ | `tera-system/TeraArchitectureMap.md` | يوضّح طبقة التوزيع ودور `tools/` |
269
269
  | `project-control/SYSTEM_EVOLUTION_LOG.md` | يسجّل كل إصدار/ترقية منفذة |
270
- | `tera-system/TOOLING_AND_MCP_POLICY.md` | السياسة الحاكمة للأدوات — المُحدِّث أداة رسمية ضمن `tera-workshop/tools/` |
270
+ | `tera-system/TOOLING_AND_MCP_POLICY.md` | السياسة الحاكمة للأدوات — المُحدِّث أداة رسمية ضمن `tools/` |
271
271
  | `.gitattributes` | `cr-at-eol` — أساس سلامة `git diff --check` عند التحديث |
272
272
 
273
273
  ---
@@ -25,7 +25,7 @@ It is a map, not a policy source. Rules remain in the files listed in `TeraPolic
25
25
  | Sub-agent lifecycle | Defines, generates, narrows, activates, and reviews specialized agents | `TeraSubAgents.md`, `AGENT_GENERATION_TEMPLATE.md`, `generated-agents/` |
26
26
  | Delivery, handoff, and closure | Produces final delivery readiness, release notes, client handover material, acceptance records, and closure reports | `project-control/DELIVERY_READINESS_REPORT.md`, `project-control/PROJECT_CLOSURE_REPORT.md`, `clients/.../delivery/` |
27
27
  | Project implementation knowledge | Maintains concise current-state operational knowledge per screen/module/service | `project-knowledge/` داخل كل تطبيق |
28
- | Tera distribution and versioning | Builds releases and distributes Tera to client repositories in a versioned, verifiable way; clients derive updates from the origin repository (RepositoryUrl) via fetch + verified release packages (Tag + Manifest + SHA lockfile + updater tools); ownership contract separates Tera-managed from client-owned files | `tera-system/TERA_DISTRIBUTION_POLICY.md`, `tera-workshop/tools/tera-fetch.ps1`, `tera-workshop/tools/tera-release.ps1`, `tera-workshop/tools/tera-update.ps1`, `.tera/lock.json` داخل مستودعات العملاء |
28
+ | Tera distribution and versioning | Builds releases and distributes Tera to client repositories in a versioned, verifiable way; clients derive updates from the origin repository (RepositoryUrl) via fetch + verified release packages (Tag + Manifest + SHA lockfile + updater tools); ownership contract separates Tera-managed from client-owned files | `tera-system/TERA_DISTRIBUTION_POLICY.md`, `tools/tera-fetch.ps1`, `tools/tera-release.ps1`, `tools/tera-update.ps1`, `.tera/lock.json` داخل مستودعات العملاء |
29
29
 
30
30
  ## 3. Folder Roles
31
31
 
@@ -44,7 +44,7 @@ It is a map, not a policy source. Rules remain in the files listed in `TeraPolic
44
44
  | `tera-system/product-standards/` | Reusable active product standards | Runtime policy, client-specific records, or application code |
45
45
  | `tera-system/engineering-helpers/` | Shared engineering reference files | Language-specific profiles |
46
46
  | `tera-workshop/` | System development and tooling files | Core policy or project files |
47
- | `tera-workshop/tools/` | Official Tera updater tooling (tera-update.ps1 + batch updater) used to pin/upgrade Tera in client repositories | Client application code; replacing client-owned files |
47
+ | `tools/` | Official Tera updater tooling (tera-update.ps1 + batch updater) used to pin/upgrade Tera in client repositories | Client application code; replacing client-owned files |
48
48
  | `book/` | Comprehensive user-facing documentation and guides (Quick Start, Vision, Quality, Policies) | Runtime operational files; per-project records |
49
49
  | `architecture/` | Structurizr C4 workspace (`.dsl` source of truth + exported diagrams) | Application code; client project files |
50
50
 
@@ -100,9 +100,9 @@ Tera must not treat approval from a contact as final unless that contact has doc
100
100
 
101
101
  ### Client Discovery Output — Application Proposal
102
102
 
103
- After the Client Discovery + Smart Interview process completes (see `TERA_RUNTIME_PROTOCOLS_CLIENT.md` Section 18), the designated agent (TCEA for external clients, مُهندس for internal projects — SCP-2026-07-28-118) generates a **professional client-facing Application Proposal** as an HTML page using `tera-workshop/APPLICATION_PROPOSAL_TEMPLATE.html`.
103
+ After the Client Discovery + Smart Interview process completes (see `TERA_RUNTIME_PROTOCOLS_CLIENT.md` Section 18), the designated agent (TCEA for external clients, مُهندس for internal projects — SCP-2026-07-28-118) generates a **professional client-facing Application Proposal** as an HTML page using `tera-workshop/client-templates/commercial/APPLICATION_PROPOSAL_TEMPLATE.md`.
104
104
 
105
- The proposal captures: understanding, users & roles, scope (MVP + out-of-scope), requirements by domain, assumptions, and proposed roadmap. Generated from `tera-workshop/APPLICATION_PROPOSAL_TEMPLATE.html`.
105
+ The proposal captures: understanding, users & roles, scope (MVP + out-of-scope), requirements by domain, assumptions, and proposed roadmap. Generated from `tera-workshop/client-templates/commercial/APPLICATION_PROPOSAL_TEMPLATE.md`.
106
106
 
107
107
  The proposal is saved under `clients/.../client-approval/` and **must be approved by the client** before formal preparation begins. The approved proposal becomes the official scope reference for all subsequent gates.
108
108
 
@@ -47,7 +47,7 @@ Project files record project-specific decisions.
47
47
  | Solution preparation templates | `tera-system/runtime/TERA_SOLUTION_PREPARATION_TEMPLATES.md` | `.opencode/agents/application-blueprint.md` | Phase 1–4 output templates for مُهندس. SCP-2026-07-28-118. |
48
48
  | Engineering handoff | `project-control/ENGINEERING_HANDOFF_PACKAGE.md` (produced by مُهندس, consumed by Tera) | `.opencode/agents/tera.md` §6 | Two-gate handoff: Solution Readiness → Engineering Intake. |
49
49
  | Phase 5 execution planning outputs | `tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md` Sections 29-31 | `.opencode/agents/tera.md`, `TERA_RUNTIME_CHECKLISTS.md`, `TeraPreExecutionGate.md` | Produces `PROJECT_MASTER_PLAN.md`, `PROJECT_DETAILED_EXECUTION_PLAN.md`, and `EXECUTION_BATCH_PLAN.md`. Split notice INS-02: Sections 29-31 moved to DELIVERY file. |
50
- | Phase 6 post-execution review template | `tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md` Section 32 | `TASK_TEMPLATE.md`, `TeraPreExecutionGate.md`, `TERA_RUNTIME_CHECKLISTS.md` | Used inside `TASK-COD-*` before final acceptance or closure. Note: `TASK_TEMPLATE.md` lives at `project-control/tasks/TASK_TEMPLATE.md` (clarified INS-07, 2026-08-01). Split notice INS-02: Section 32 moved to DELIVERY file. |
50
+ | Phase 6 post-execution review template | `tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md` Section 32 | `TASK_TEMPLATE.md`, `TeraPreExecutionGate.md`, `TERA_RUNTIME_CHECKLISTS.md` | Used inside `TASK-COD-*` before final acceptance or closure. Note: `TASK_TEMPLATE.md` lives at `project-control/templates/TASK_TEMPLATE.md` (clarified INS-07, 2026-08-01). Split notice INS-02: Section 32 moved to DELIVERY file. |
51
51
  | Phase 7 delivery, handover, and closure | `.opencode/agents/tera.md` Section 5 + `TERA_RUNTIME_TEMPLATES_DELIVERY.md` Section 35 | `.opencode/agents/tera.md`, `TERA_RUNTIME_CHECKLISTS.md`, `TERA_RUNTIME_PROTOCOLS.md` | Project closure is separate from last TASK-COD closure. Phase 7 does not execute code. Split notice INS-02: Section 34 moved to DELIVERY file. |
52
52
  | Sub-agent registry (core) | `tera-system/TeraSubAgents.md` | `.opencode/agents/tera.md` | Core agents (Engineering, QA, Auditor, Software Designer, DesignReviewer) — 904 lines 🟡 |
53
53
  | Sub-agent registry (helpers) | `tera-system/TeraHelperAgents.md` | `.opencode/agents/tera.md` | Helper agents (Security, DevOps, Domain, ERP, etc.) — 964 lines 🟢 — split from TeraSubAgents.md via SCP-2026-07-26 |
@@ -105,7 +105,7 @@ Project files record project-specific decisions.
105
105
  | Business Transformation Consultant (BTCA) | `.opencode/agents/tera-business-transformation-consultant.md` | `tera-system/consulting-helpers/BTCA_METHODOLOGY_FRAMEWORK.md`, `BTCA_REPORT_TEMPLATES.md` | عميل مستقل للاستشارات الإدارية والتنظيمية غير البرمجية — Track C. SCP-2026-07-29-002. |
106
106
  | BTCA — Methodology Framework | `tera-system/consulting-helpers/BTCA_METHODOLOGY_FRAMEWORK.md` | `.opencode/agents/tera-business-transformation-consultant.md` | إطار المنهجية: تصنيف الأدلة الخماسي، مراحل العمل، دليل المقابلات، هيكل التقرير النهائي. |
107
107
  | BTCA — Report Templates | `tera-system/consulting-helpers/BTCA_REPORT_TEMPLATES.md` | `.opencode/agents/tera-business-transformation-consultant.md` | قوالب التقارير العشرة الأساسية + التقرير التنفيذي. |
108
- | Tera distribution (versioned) | `tera-system/TERA_DISTRIBUTION_POLICY.md` | `.tera/lock.json` في مستودعات العملاء | توزيع Tera المُروّس على مستودعات العملاء: استمداد من المستودع الأصلي (`tera-fetch.ps1` + RepositoryUrl)، إصدارات (Tag+SHA)، عقد ملكية، أدوات `tera-workshop/tools/`. SCP-2026-08-15-009. |
108
+ | Tera distribution (versioned) | `tera-system/TERA_DISTRIBUTION_POLICY.md` | `.tera/lock.json` في مستودعات العملاء | توزيع Tera المُروّس على مستودعات العملاء: استمداد من المستودع الأصلي (`tera-fetch.ps1` + RepositoryUrl)، إصدارات (Tag+SHA)، عقد ملكية، أدوات `tools/`. SCP-2026-08-15-009. |
109
109
  | Tera product standards — Maintenance | `tera-system/product-standards/maintenance-apps/STANDARD_DEFINITION.md` + `BEST_PRACTICES_DOMAIN.md` | Not applicable | Active reusable product standards for Maintenance/FSM/WOM; content remains in the standards files. |
110
110
 
111
111
  ## 4. Duplication Policy
@@ -429,6 +429,22 @@ Minimum Profitable Price = Estimated Hours × Internal Hourly Rate
429
429
 
430
430
  إذا كانت تقديرات الساعات أقل من الواقع المتوقع، يتم اعتماد تقدير الساعات الأعلى لا رقم الـ Scorecard فقط.
431
431
 
432
+ ### قاعدة توثيق تقدير الساعات (SCP-2026-08-29-002)
433
+
434
+ 1. **تقدير الساعات إلزامي قبل اعتماد أي سعر — لا يجوز الاعتماد والساعات غير مدخلة (صفر) أو غير موثقة.**
435
+ 2. **الحد الأدنى لتقدير الساعات للتسعير المباشر = 40 ساعة.** أي تقدير أقل يستدعي مراجعة إلزامية أو تحويلاً لتحليل مدفوع (§20).
436
+ 3. يُفضَّل توثيق التقدير عبر **مصفوفة ساعات موزعة** (واجهات / منطق / بيانات / تكاملات / اختبار / نشر / توثيق) — النطاقات الإرشادية أدناه **دليل وليست التزاماً**، تُضبط حسب النطاق الفعلي. الحاسبة v4.3 تتضمن ورقة `HoursEstimator` لهذا الغرض.
437
+
438
+ | عنصر التقدير | صغير (ساعة) | متوسط (ساعة) | كبير (ساعة) |
439
+ |---|:---:|:---:|:---:|
440
+ | واجهات وشاشات (UI) | 15–25 | 30–50 | 60–100 |
441
+ | منطق الأعمال | 10–20 | 25–45 | 50–90 |
442
+ | قاعدة البيانات | 5–10 | 12–25 | 30–60 |
443
+ | التكاملات | 0–5 | 8–20 | 25–60 |
444
+ | الاختبار والجودة QA | 5–10 | 12–25 | 30–60 |
445
+ | النشر والاستضافة | 2–5 | 5–10 | 10–20 |
446
+ | التوثيق والتدريب | 2–5 | 5–15 | 15–30 |
447
+
432
448
  ---
433
449
 
434
450
  ## 18. الحد الأدنى المطلق
@@ -590,6 +606,7 @@ Minimum Engagement Fee = 100 JOD
590
606
  11. أي مشروع مستعجل يخضع لـ Rush Premium.
591
607
  12. أي مشروع متوسط 41% - 60% لا يُسعّر مباشرة إلا إذا كان النطاق مكتوبًا وثابتًا.
592
608
  13. لا يتم تسليم النسخة النهائية قبل تسوية الدفعات المستحقة.
609
+ 14. لا يُعتمد أي سعر والساعات غير مدخلة (صفر) أو أقل من الحد الأدنى (40 ساعة) — راجع §17 (SCP-2026-08-29-002).
593
610
 
594
611
  ---
595
612
 
@@ -672,3 +689,4 @@ max(Final Scorecard Price, 100 JOD, Minimum Profitable Price)
672
689
  | 5 | الحد الأعلى للتخفيض العادي | 10% |
673
690
  | 6 | الحد الأعلى للتخفيض الخاص | 15% |
674
691
  | 7 | إعادة مراجعة Anchor Points | بعد اختبار 3 - 5 مشاريع فعلية |
692
+ | 8 | الحد الأدنى لتقدير الساعات (Minimum Hours for Direct Pricing) | 40 ساعة |
@@ -20,11 +20,11 @@ description: Canonical source for the 13 mandatory TCEA discovery domains — si
20
20
  | 3 | Process & Workflow | Workflow & Operations | Core business processes, approval flows, states | نعم | نعم |
21
21
  | 4 | Data & Content | Data & Content | Entities, relationships, data volume, file types + **Content Type (Application Data / User-Facing Content / Mixed)** — لمشاريع User-Facing Content/Mixed: استراتيجية المحتوى (التموضع/النبرة/Claims المسموحة/الخطوط الحمراء) مؤكدة من المالك | نعم | نعم |
22
22
  | 5 | Scope & MVP | Scope & MVP | In/out scope, priorities, phases | نعم | نعم |
23
- | 6 | Screens & UX | Screens & UX | Screen count, UI complexity, responsive needs | نعم | نعم |
23
+ | 6 | Screens & UX | Screens & UX | Screen count, UI complexity, responsive needs + **شكل عرض البيانات الرئيسي المفضل من وجهة نظر الزبون (مثال: شبكة يومية/أسبوعية/شهرية) + الحقول/الإجراءات المتوقعة على كل شاشة رئيسية** | نعم | نعم |
24
24
  | 7 | Notifications Engine | Notifications Engine | Email, SMS, in-app, push, templates | لا | نعم |
25
25
  | 8 | Reports & Dashboards | Reports & Dashboards | Report types, charts, filters, export | نعم | نعم |
26
- | 9 | Design & Branding | Design & Branding | Brand guidelines, design source (Figma/etc), UI kit | لا | نعم |
27
- | 10 | Technical, Hosting & Compliance | Technical, Hosting & Compliance | Stack, hosting, domain, SSL, compliance needs | نعم | نعم |
26
+ | 9 | Design & Branding | Design & Branding | Brand guidelines, design source (Figma/etc), UI kit + **مراجع بصرية يحبها/يكرهها الزبون + الألوان والنبرة المفضلة** | لا | نعم |
27
+ | 10 | Technical, Hosting & Compliance | Technical, Hosting & Compliance | Stack, hosting, domain, SSL, compliance needs + **تفضيل منطقة الاستضافة (محلية/دولية) والمبرر** | نعم | نعم |
28
28
  | 11 | Security & Audit | Security & Audit | Auth method, data sensitivity, audit trail | نعم | نعم |
29
29
  | 12 | Integrations & APIs | Integrations & APIs | Third-party APIs, webhooks, data sync | نعم | نعم |
30
30
  | 13 | Acceptance, Commercials & Warranty | Acceptance, Commercials & Warranty | Acceptance criteria, budget, payment plan, warranty, support terms | نعم | نعم |
@@ -40,6 +40,7 @@ description: Canonical source for the 13 mandatory TCEA discovery domains — si
40
40
  5. الأسماء المقبولة (Aliases) يمكن استخدامها في الأسئلة والحوارات مع Majed، لكن **الاسم الرسمي (Canonical)** يُستخدم في جميع الوثائق الرسمية (`DISCOVERY_COVERAGE_SUMMARY.md`, `DRAFT_QUOTATION.md`, `TERA_HANDOFF_PACKAGE.md`).
41
41
  6. **المجال 13 (Acceptance, Commercials & Warranty)** يتطلب تغطية 3 جوانب داخلية على الأقل: (أ) معايير القبول والاختبارات, (ب) الميزانية وخطة الدفع, (ج) الضمان والصيانة.
42
42
  7. **Content Type Rule (SCP-2026-08-15-016):** إذا كان Content Type = `User-Facing Content` أو `Mixed` (موقع/صفحة هبوط/تسويق/محتوى)، تُفعَّل **Content Confirmation Gate** في مرحلة التحضير (بعد `07_SCREENS_AND_UI_STRUCTURE.md` وقبل التصميم النهائي)، ويُشترط `CONTENT_REQUIREMENTS.md` معتمد من المالك في Solution Readiness Gate. التطبيقات القياسية (Application Data فقط) لا تُفعَّل — Anti-Bloat.
43
+ 8. **Non-Functional Depth Rule (SCP-2026-08-29-001):** بنود العمق غير الوظيفي — تفضيلات الزبون في التصميم والمحتوى والشاشات والتقنية (مراجع بصرية، ألوان/نبرة، شكل العرض الرئيسي، حقول الشاشات، منطقة الاستضافة) — إلزامية التغطية قبل إعلان `Complete` للمجالات 6/9/10 (و4 حسب Content Type Rule أعلاه)، بعمق متناسب مع حجم المشروع (نفس مبدأ A.4). إذا لم يجب الزبون أو لم تتوفر المعلومة → `Partial` + `UNCERTAINTY_NOTICE` — لا يجوز `Complete`. الأسئلة المرجعية في `TeraApplicationQuestionBank.md` (Q5.2/Q5.3/Q5.7/Q5.15/Q4.12/Q7.1 وغيرها).
43
44
 
44
45
  ---
45
46
 
@@ -863,7 +863,7 @@ Use these outlines when creating files under `clients/.../client-approval/`. Cli
863
863
 
864
864
  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.
865
865
 
866
- Reference file: `tera-workshop/APPLICATION_PROPOSAL_TEMPLATE.html`
866
+ Reference file: `tera-workshop/client-templates/commercial/APPLICATION_PROPOSAL_TEMPLATE.md`
867
867
 
868
868
  After the Client Discovery + Smart Interview process completes, Tera populates the template with:
869
869
  - Application name, date, client name
@@ -1,8 +1,8 @@
1
1
  # Tera Runtime Templates — Preparation & Blueprint Outputs
2
2
 
3
- These are the preparation-phase templates (Sections 35–41: TCEA outputs, ApplicationBlueprint outputs, and Content Requirements) split from TERA_RUNTIME_TEMPLATES.md via INSPECTION-2026-08-01 (INS-02).
3
+ These are the preparation-phase templates (Sections 35–40: TCEA outputs and ApplicationBlueprint outputs) split from TERA_RUNTIME_TEMPLATES.md via INSPECTION-2026-08-01 (INS-02).
4
4
  Main file: `tera-system/runtime/TERA_RUNTIME_TEMPLATES.md` (Sections 1–28).
5
- Delivery templates: `tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md` (Sections 29–38).
5
+ Delivery templates: `tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md` (Sections 29–34).
6
6
 
7
7
  ---
8
8
 
@@ -46,6 +46,8 @@ It is produced by TCEA after completing the 13-domain discovery and before any s
46
46
 
47
47
  > **ملاحظة المجال 13:** يحتاج تغطية 3 جوانب داخلية على الأقل: (أ) معايير القبول والاختبارات, (ب) الميزانية وخطة الدفع, (ج) الضمان والصيانة.
48
48
 
49
+ > **Non-Functional Depth (SCP-2026-08-29-001):** قبل إعلان Complete للمجالات 4/6/9/10، سجّل تغطية تفضيلات الزبون غير الوظيفية (مراجع بصرية، ألوان/نبرة، شكل العرض الرئيسي، حقول الشاشات، منطقة الاستضافة) في عمود "Reason if not Complete" أو في قسم ملاحظات التغطية — Partial + UNCERTAINTY_NOTICE إن لم تُجب.
50
+
49
51
  ## 3. Coverage Decision
50
52
 
51
53
  | Item | Value |
@@ -40,7 +40,7 @@ project-control/RELEASE_NOTES.md
40
40
  project-control/NEXT_VERSION_HANDOFF.md
41
41
  project-control/PROJECT_STATE.md
42
42
  project-control/TASK_REGISTRY.md
43
- project-control/tasks/TASK_TEMPLATE.md
43
+ project-control/templates/TASK_TEMPLATE.md
44
44
  ```
45
45
 
46
46
  Rules:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tera-system/core",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Tera System OpenCode Plugin — governance core, 20 agents, 11 commands, distribution tools (personal edition)",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
@@ -11,6 +11,7 @@
11
11
  "agents",
12
12
  "commands",
13
13
  "core",
14
+ "assets",
14
15
  "tools",
15
16
  "scripts",
16
17
  "MANIFEST.json",
@@ -20,6 +21,10 @@
20
21
  "LICENSE.md",
21
22
  "RELEASES.md"
22
23
  ],
24
+ "bin": {
25
+ "tera-restore": "scripts/install.js",
26
+ "tera-core-restore": "scripts/install.js"
27
+ },
23
28
  "scripts": {
24
29
  "postinstall": "node scripts/install.js"
25
30
  },
package/scripts/build.mjs CHANGED
@@ -63,6 +63,7 @@ const checks = [
63
63
  ["agents", "agents"],
64
64
  ["commands", "commands"],
65
65
  ["core/tera-system", "coreFiles"],
66
+ ["assets", "assets"],
66
67
  ];
67
68
  let fail = false;
68
69
  for (const [dir, key] of checks) {
@@ -94,6 +95,7 @@ const groupHashes = {
94
95
  "core/tera-system": groupSha("core/tera-system"),
95
96
  tools: groupSha("tools"),
96
97
  "core/project-control": groupSha("core/project-control"),
98
+ assets: groupSha("assets"),
97
99
  };
98
100
  console.log(" group hashes:");
99
101
  for (const [g, h] of Object.entries(groupHashes)) console.log(` ${g.padEnd(20)} ${h ?? "(n/a)"}`);
@@ -195,6 +195,10 @@ installGroup({ name: "agents", src: path.join(PKG_ROOT, "agents"), dest: path.jo
195
195
  installGroup({ name: "commands", src: path.join(PKG_ROOT, "commands"), dest: path.join(target, ".opencode", "commands") });
196
196
  installGroup({ name: "tera-system", src: path.join(PKG_ROOT, "core", "tera-system"), dest: path.join(target, "tera-system") });
197
197
  installGroup({ name: "tools", src: path.join(PKG_ROOT, "tools"), dest: path.join(target, "tools") });
198
+ // Required assets (SCP-2026-08-29-002): pricing calculator + client templates.
199
+ // Installs relative to target root so `project-control/...` and `tera-workshop/...`
200
+ // land at the exact paths policies reference. Never skipped (unlike project-control skeleton).
201
+ installGroup({ name: "assets", src: path.join(PKG_ROOT, "assets"), dest: target });
198
202
  installConfig();
199
203
  installProjectControl();
200
204