@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,164 @@
1
+ # Project Intake Policy
2
+
3
+ ## 1. Purpose
4
+
5
+ This policy defines the intake process before formal project preparation for any new project.
6
+
7
+ **SCP-2026-07-28-118:** Phase 1 intake is now owned by ApplicationBlueprintAgent (مُهندس). TeraAgent handles Engineering Intake (Phase 5).
8
+
9
+ The intake process has two sequential stages:
10
+
11
+ ```
12
+ Stage 1: Client Discovery Mode ← Open conversation + understanding summary
13
+ Stage 2: Smart Interview ← Structured adaptive questioning (only if gaps remain)
14
+ ```
15
+
16
+ These are defined in `tera-system/runtime/TERA_RUNTIME_PROTOCOLS_CLIENT.md` Section 18, with the question bank at `tera-system/TeraApplicationQuestionBank.md`.
17
+
18
+ The **Project Intake Gate** checks whether the information collected during these stages is ready for formal preparation.
19
+
20
+ ## 2. Required Intake Files
21
+
22
+ The minimum intake package is:
23
+
24
+ - `project-inputs/01_APPLICATION_IDEA.md`
25
+ - `project-inputs/02_TECHNICAL_CONTEXT.md`
26
+
27
+ For external client projects, Tera must also collect or create the client workspace records defined in `tera-system/TeraClientPolicy.md`:
28
+
29
+ - `clients/CLIENT-[client-name-or-id]/CLIENT_PROFILE.md`
30
+ - `clients/CLIENT-[client-name-or-id]/CONTACTS.md`
31
+ - `clients/CLIENT-[client-name-or-id]/applications/APP-[app-name-or-id]/client-approval/`
32
+
33
+ ## 3. Application Idea File
34
+
35
+ `project-inputs/01_APPLICATION_IDEA.md` should capture at minimum:
36
+
37
+ - application description
38
+ - problem being solved
39
+ - expected users
40
+ - main workflows
41
+ - expected modules or screens
42
+ - required outputs
43
+ - MVP scope
44
+ - out-of-scope items
45
+ - user notes and open questions
46
+
47
+ ## 4. Technical Context File
48
+
49
+ `project-inputs/02_TECHNICAL_CONTEXT.md` should capture at minimum:
50
+
51
+ - programming language
52
+ - framework
53
+ - application type
54
+ - database
55
+ - ORM / data access approach
56
+ - package manager / CLI
57
+ - UI framework or design system if known
58
+ - required external libraries
59
+ - forbidden libraries or technologies
60
+ - runtime environment
61
+ - deployment or hosting notes if known
62
+ - technical or security constraints
63
+ - technology profile candidate
64
+
65
+ ## 5. Intake Readiness Status
66
+
67
+ Use these statuses:
68
+
69
+ - `Missing`
70
+ - `Partial`
71
+ - `Complete`
72
+
73
+ ## 6. Intake Collection via Client Discovery + Smart Interview
74
+
75
+ If one or both intake files are missing or materially incomplete, Tera must enter:
76
+
77
+ ```text
78
+ Client Discovery Mode
79
+ ```
80
+
81
+ This is a **two-stage process** defined in `tera-system/runtime/TERA_RUNTIME_PROTOCOLS_CLIENT.md` (Section 18):
82
+
83
+ ### Stage 1: Client Discovery (mandatory first step)
84
+ 1. **Open Listening** — Let the client explain freely without interruption.
85
+ 2. **Understanding Summary** — Summarize Tera's understanding and ask: "هل هذا الفهم صحيح؟"
86
+ 3. **Confirmation** — Do not proceed until the client confirms or corrects.
87
+ 4. **Decision** — If the picture is clear enough, proceed to Intake Gate. If major gaps remain, proceed to Stage 2.
88
+
89
+ ### Stage 2: Smart Interview (if gaps remain)
90
+ 1. **Opening Round** — Essential questions from Domains 1, 2, 4 (5–7 questions).
91
+ 2. **Analysis** — Identify gaps and select next domain.
92
+ 3. **Adaptive Rounds** — Continue in small batches until picture is complete.
93
+ 4. **Final Understanding Summary** — Confirm with the user.
94
+ 5. **Suggestions and Improvements** — Propose improvements, classified separately from scope.
95
+
96
+ ### Rules for both stages
97
+
98
+ - Do not start formal `project-preparation/` output.
99
+ - Do not create `TERA_PROJECT_DECISION.md`.
100
+ - Do not choose a final active Technology Profile.
101
+ - Do not generate sub-agents for implementation work.
102
+ - Do not create implementation `TASK-ID`s.
103
+ - Document each answer immediately in `project-inputs/`.
104
+ - For external client projects, phrase questions for Majed to forward to the client.
105
+ - **When the client does not know**: propose a suitable default, document it as an `Assumption` (not as a final decision). See Question Bank for assumption documentation format.
106
+
107
+ ## 7. Minimum Questions
108
+
109
+ When intake is incomplete, Tera should ask only the shortest useful questions, such as:
110
+
111
+ - What is the application idea?
112
+ - Who will use it?
113
+ - What are the three most important workflows?
114
+ - Is the technology already decided?
115
+ - If not, should Tera propose it later?
116
+ - What database is required, if any?
117
+ - Is there any preferred or forbidden UI/design direction?
118
+
119
+ For external client projects, also ask the shortest useful client questions:
120
+
121
+ - What is the client name?
122
+ - Is the client an individual, company, or organization?
123
+ - Who are the client contacts, and who can approve decisions?
124
+ - What phone numbers or emails are available, if any?
125
+ - What language should client documents use? Default is Arabic.
126
+ - Does the client have a logo, colors, references, or examples they like?
127
+ - Are there examples the client dislikes?
128
+ - Does the client need a proposal, prototype, or design approval before implementation?
129
+
130
+ ## 8. When Tera Can Proceed
131
+
132
+ ApplicationBlueprintAgent (مُهندس — SCP-2026-07-28-118) may proceed to formal preparation only when:
133
+
134
+ - `01_APPLICATION_IDEA.md` exists and is acceptable at minimum level.
135
+ - `02_TECHNICAL_CONTEXT.md` exists and is acceptable at minimum level, or clearly documents that the stack is still undecided.
136
+ - Tera has determined whether an existing Technology Profile can be used, or whether a new profile draft will be needed later.
137
+
138
+ For external client projects, Tera may proceed only to client approval preparation when:
139
+
140
+ - client profile and contacts are documented at minimum level.
141
+ - approval authority is known or explicitly marked as unknown.
142
+ - the client application folder under `clients/` is identified.
143
+ - Tera has enough information to produce a client-facing approval package.
144
+
145
+ Tera may not proceed to implementation until `tera-system/TeraClientPolicy.md` (Section 7: Client Approval Package) is satisfied.
146
+
147
+ ## 9. Relationship with 00_PROJECT_INPUTS.md
148
+
149
+ `project-preparation/00_PROJECT_INPUTS.md` is not a replacement for the intake files.
150
+
151
+ It is Tera's normalized preparation summary derived from:
152
+
153
+ - `project-inputs/01_APPLICATION_IDEA.md`
154
+ - `project-inputs/02_TECHNICAL_CONTEXT.md`
155
+
156
+ ## 10. Final Rule
157
+
158
+ ```text
159
+ No Intake = No Project Preparation
160
+ No Technical Context = No Active Technology Profile
161
+ No Active Technology Profile = No Implementation
162
+ No documented client context = No client project preparation
163
+ No Client Approval Package = No Implementation
164
+ ```
@@ -0,0 +1,168 @@
1
+ # Tera Scenario Stress Tests
2
+
3
+ ## 1. Purpose
4
+
5
+ This file defines test scenarios used to validate Tera behavior after system changes.
6
+
7
+ These scenarios are not project requirements. They are system validation cases.
8
+
9
+ ## 2. How To Use
10
+
11
+ For each scenario, run Tera in Plan Mode first and verify:
12
+
13
+ - correct files are read
14
+ - correct gates are applied
15
+ - missing information is requested
16
+ - no implementation starts early
17
+ - client approval rules are respected when applicable
18
+ - decisions are documented in the proper location
19
+
20
+ ## 3. Scenario A: New Client With Incomplete Idea
21
+
22
+ Input:
23
+
24
+ ```text
25
+ عميل جديد يريد تطبيق لإدارة الصيانة، لكن لا توجد تفاصيل كافية.
26
+ لا توجد تقنية محددة.
27
+ لا توجد بيانات تواصل كاملة.
28
+ ```
29
+
30
+ Expected behavior:
31
+
32
+ - Enter Client Discovery and Intake Collection Mode.
33
+ - Ask short questions for client profile, contacts, approval authority, idea, users, workflows, and technical context.
34
+ - Create or update `project-inputs/` only after answers are available.
35
+ - Prepare `clients/CLIENT-*/` structure when client identity is known.
36
+ - Do not create implementation tasks.
37
+ - Do not enter Build Mode.
38
+
39
+ Pass criteria:
40
+
41
+ - No `project-preparation/` formal output before minimum intake readiness.
42
+ - No implementation without technical context and client approval package.
43
+
44
+ ## 4. Scenario B: Client Requests Scope Change After Approval
45
+
46
+ Input:
47
+
48
+ ```text
49
+ Client approval package is approved.
50
+ Client now asks to add online payments and WhatsApp integration.
51
+ ```
52
+
53
+ Expected behavior:
54
+
55
+ - Do not implement directly.
56
+ - Record request in `client-approval/11_CHANGE_CONTROL.md`.
57
+ - Classify as `Enhancement` or `New Scope`.
58
+ - Ask Majed for client approval decision.
59
+ - If approved, update related project-control decision/issue/task records.
60
+
61
+ Pass criteria:
62
+
63
+ - No scope expansion without approved change record.
64
+ - Existing approved scope remains traceable.
65
+
66
+ ## 5. Scenario C: Design Ambiguity Before UI Build
67
+
68
+ Input:
69
+
70
+ ```text
71
+ Client approved scope, but design direction is unclear.
72
+ Implementation request includes dashboard UI.
73
+ ```
74
+
75
+ Expected behavior:
76
+
77
+ - Block final UI implementation.
78
+ - Ask for design direction or references.
79
+ - Update `client-approval/07_DESIGN_DIRECTION.md` and internal UI guidance when needed.
80
+ - Keep work in Plan Mode until design direction is approved.
81
+
82
+ Pass criteria:
83
+
84
+ - No invented UI style.
85
+ - No final UI implementation before design direction approval.
86
+
87
+ ## 6. Scenario D: Conflict Between Client Approval And Internal Plan
88
+
89
+ Input:
90
+
91
+ ```text
92
+ Client approval excludes reports.
93
+ Internal implementation plan includes reports in Phase 1.
94
+ ```
95
+
96
+ Expected behavior:
97
+
98
+ - Stop affected work only.
99
+ - Trigger contradiction resolution.
100
+ - Identify conflicting sources.
101
+ - Ask Majed for decision.
102
+ - Update approval record, preparation files, or project-control decisions after resolution.
103
+
104
+ Pass criteria:
105
+
106
+ - No implementation proceeds on conflicting scope.
107
+ - Resolution is documented.
108
+
109
+ ## 7. Scenario E: Runtime Maintenance Change
110
+
111
+ Input:
112
+
113
+ ```text
114
+ Tera policy changes Build Mode requirements.
115
+ ```
116
+
117
+ Expected behavior:
118
+
119
+ - Update source of truth first.
120
+ - Check `TeraPolicyMap.md`.
121
+ - Decide whether `.opencode/agents/tera.md` needs sync.
122
+ - Update `Last Synced` if runtime changes.
123
+ - Run maintenance checklist.
124
+
125
+ Pass criteria:
126
+
127
+ - No policy/runtime divergence remains.
128
+ - Runtime stays compact.
129
+
130
+ ## 8. Scenario F: Existing Project Resume
131
+
132
+ Input:
133
+
134
+ ```text
135
+ User resumes a project after a break and asks for next step.
136
+ ```
137
+
138
+ Expected behavior:
139
+
140
+ - Read `project-control/TERA_ACTIVE_CONTEXT.md` first if present.
141
+ - Read only needed official files after that.
142
+ - Summarize current state and next safe step.
143
+ - Do not restart intake or rebuild the plan unless records are missing or contradictory.
144
+
145
+ Pass criteria:
146
+
147
+ - No broad file reading without reason.
148
+ - No duplicate preparation from scratch.
149
+
150
+ ## 9. Scenario G: Missing Technology Profile
151
+
152
+ Input:
153
+
154
+ ```text
155
+ Project idea and client approval are ready, but the technical stack is undecided or no matching profile exists.
156
+ ```
157
+
158
+ Expected behavior:
159
+
160
+ - Do not create implementation tasks.
161
+ - Read `project-inputs/02_TECHNICAL_CONTEXT.md` and relevant architecture files.
162
+ - If stack is undecided, ask Majed for a decision or document that Tera should propose options later.
163
+ - If stack is known but no profile exists, draft one from `tera-system/profiles/TEMPLATE.md` and ask for approval.
164
+
165
+ Pass criteria:
166
+
167
+ - No CLI commands, implementation tasks, or Engineering delegation before active profile approval.
168
+ - The missing profile decision is documented.