@adaas/a-concept 0.3.5 β†’ 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,99 +1,85 @@
1
1
  <img align="left" style="margin-right:40px; margin-bottom:80px;" width="200" height="200" src="https://raw.githubusercontent.com/ADAAS-org/adaas-a-concept/main/docs/a-concept-logo.png" alt="A-Concept Logo">
2
2
 
3
- # A-Concept
3
+ # A-Concept
4
4
 
5
- πŸš€ A Paradigm Shift for Software Development in the Age of AI and [Industry 5.0](https://research-and-innovation.ec.europa.eu/research-area/industrial-research-and-innovation/industry-50_en).
5
+ **A paradigm shift for software development in the age of AI and [Industry 5.0](https://research-and-innovation.ec.europa.eu/research-area/industrial-research-and-innovation/industry-50_en).**
6
6
 
7
7
  ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
8
8
  ![Node.js](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)
9
9
  ![npm](https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=white)
10
-
11
10
  ![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)
12
11
  ![Version](https://img.shields.io/npm/v/@adaas/a-concept)
13
12
  ![Downloads](https://img.shields.io/npm/dm/@adaas/a-concept)
14
13
  ![Build Status](https://img.shields.io/badge/build-passing-brightgreen)
15
14
 
15
+ <br clear="left"/>
16
16
 
17
17
  ---
18
18
 
19
- ## πŸ“– **Table of Contents**
20
-
21
- 1. [Overview](#-overview)
22
- 2. [Why Choose A-Concept?](#-why-choose-a-concept)
23
- 3. [Core Principles](#-core-principles)
24
- - [Technology](#-technology)
25
- - [Collaboration](#-collaboration)
26
- - [Bridging Architecture & Code](#-bridging-architecture--code)
27
- 4. [Getting Started](#-getting-started)
28
- 5. [Challenges in Modern Development](#-challenges-in-modern-development)
29
- - [AI Hallucinations and Incorrect Code Outputs](#-ai-hallucinations-and-incorrect-code-outputs)
30
- - [The Gap Between Software Design and Implementation](#-the-gap-between-software-design-and-implementation)
31
- - [Scaling and Product Evolution](#-scaling-and-product-evolution)
32
- - [Inappropriate Role Combinations and Team Structures](#-inappropriate-role-combinations-and-team-structures)
33
- - [Outdated SDLC Methodologies](#-outdated-sdlc-methodologies)
34
- 6. [About the Team](#-about-the-team)
35
-
36
- ---
37
-
19
+ ## Table of Contents
38
20
 
39
- ## πŸ“– Overview
21
+ 1. [Overview](#overview)
22
+ 2. [Core Principles](#core-principles)
23
+ 3. [Getting Started](#getting-started)
24
+ 4. [Challenges We Solve](#challenges-we-solve)
25
+ 5. [Performance](#performance)
26
+ 6. [About the Team](#about-the-team)
27
+ 7. [License](#license)
40
28
 
41
- A-Concept is a modern framework created by the ADAAS R&D teams to redefine how we design and develop software in the Industry 5.0 era. It combines:
29
+ ---
42
30
 
43
- 1. **The A-Concept Paradigm**: A revolutionary architectural framework rooted in an enhanced C4 model, designed to bridge software design and actual development.
31
+ ## Overview
44
32
 
45
- 2. **The A-Concept Framework**: A robust software development toolkit that brings the paradigm to life. It includes tools, APIs, and integrations to enable developers to implement the A-Concept methodology seamlessly in their projects, regardless of the platform or domain.
33
+ A-Concept is a modern framework built by the ADAAS R&D team to redefine how software is designed and developed in the Industry 5.0 era. It is three things in one:
46
34
 
47
- 3. **A-Concept Ecosystem**: A suite of AI-prepared components, libraries, and modules designed to ensure AI-generated code is not only functional but also architecturally sound.
35
+ **The A-Concept Paradigm** β€” an architectural framework designed to permanently close the gap between software design and actual implementation. Architecture and code are treated as a single artifact, not two separate concerns that drift apart over time.
48
36
 
49
- With A-Concept, developers and businesses can create software that evolves seamlessly, breaking free from outdated methodologies and limitations.
37
+ **The A-Concept Framework** β€” a software development toolkit that brings the paradigm to life with tools, APIs, and integrations that work across any platform or domain.
50
38
 
51
- ## 🌍 Core Principles
39
+ **The A-Concept Ecosystem** β€” a suite of AI-prepared components, libraries, and modules designed to ensure AI-generated code is not only functional but architecturally sound.
52
40
 
53
- ### πŸ”§ Technology
41
+ ---
54
42
 
55
- Unlike traditional frameworks that impose restrictions, A-Concept:
56
- - Offers tools, not rules.
57
- - Encourages flexibility to build, combine, and innovate across platforms.
58
- - Provides AI-ready modules for faster and more accurate development.
43
+ ## Core Principles
59
44
 
60
- ### 🫠 Collaboration
45
+ ### Tools, Not Rules
61
46
 
62
- SCRUM is outdated. Here’s why A-Concept takes a futuristic approach:
63
- - Simplifies processes for solo entrepreneurs and lean enterprises.
64
- - Eliminates unnecessary rituals, focusing instead on results and innovation.
65
- - Enhances developer productivity by automating repetitive tasks, enabling teams to focus on optimized, high-quality code.
47
+ A-Concept does not dictate how you build. It offers composable primitives that give you flexibility to innovate across platforms, while AI-ready modules accelerate development without sacrificing quality.
66
48
 
67
- ### πŸ”½ Bridging Architecture & Code
49
+ ### Results Over Ritual
68
50
 
69
- Traditional development often struggles with a disconnect between architecture and code. A-Concept fixes this by:
70
- - Extending the C4 model to include design capabilities.
71
- - Ensuring architecture and code stay in sync with AI-assisted tools.
72
- - Empowering developers to become architects with intuitive and self-documented workflows.
51
+ SCRUM was designed for a different era. A-Concept takes a leaner approach β€” eliminating unnecessary process overhead, simplifying collaboration for solo engineers and lean teams alike, and focusing effort on code that ships rather than ceremonies that don't.
73
52
 
53
+ ### Architecture and Code as One
74
54
 
75
- ## Problems
55
+ The persistent disconnect between high-level design and day-to-day implementation is one of the industry's oldest problems. A-Concept solves it by merging the two into a single self-documenting workflow. Architecture stays synchronised with code automatically β€” giving developers, architects, and stakeholders a single source of truth at all times.
76
56
 
57
+ ---
77
58
 
59
+ ## Getting Started
78
60
 
79
- ## πŸ“‚ Getting Started
61
+ Install the package:
80
62
 
81
63
  ```bash
82
64
  cd /your/project/location
83
- npm i @adaas/a-concept
65
+ npm install @adaas/a-concept
84
66
  ```
85
- Then export
86
67
 
87
- ```ts
88
- import { Concept } from '@adaas/a-concept';
89
- const concept = new Concept({
68
+ Create a concept:
69
+
70
+ ```typescript
71
+ import { A_Concept } from '@adaas/a-concept';
72
+
73
+ const concept = new A_Concept({
90
74
  name: 'my-concept'
91
75
  });
92
76
  ```
93
77
 
94
- and extend
78
+ Extend it with fragments and containers:
79
+
80
+ ```typescript
81
+ import { A_Concept, A_Config, A_ConfigLoader } from '@adaas/a-concept';
95
82
 
96
- ```ts
97
83
  (async () => {
98
84
  const concept = new A_Concept({
99
85
  name: 'test-simple',
@@ -118,55 +104,107 @@ and extend
118
104
  })();
119
105
  ```
120
106
 
107
+ ---
108
+
109
+ ## Challenges We Solve
110
+
111
+ ### AI Hallucinations and Incorrect Code Outputs
112
+
113
+ AI code generation tools produce plausible-looking but architecturally flawed output. Without boundaries, AI contributions drift from the intended design.
114
+
115
+ A-Concept provides self-documenting primitives and well-defined structural contracts that constrain AI to operate within the correct architectural context β€” making generated code both functional and sound.
121
116
 
117
+ ### The Gap Between Design and Implementation
122
118
 
123
- ## πŸ‘¨β€πŸ’» About the Team
119
+ Documentation becomes outdated the moment it is written. Architecture diagrams and the actual codebase diverge within weeks, leaving teams navigating an increasingly unreliable map.
124
120
 
125
- The [ADAAS R&D](https://adaas.org) team comprises seasoned developers and architects who’ve been part of software evolution from its early days. We understand the pain points of traditional methodologies and are passionate about creating tools that bridge gaps and propel development into the future.
121
+ A-Concept merges design and implementation into a single process. The framework's self-documenting capabilities keep architecture permanently synchronised with code, providing clarity for developers and stakeholders without any manual upkeep.
126
122
 
123
+ ### Scaling and Long-term Evolution
127
124
 
125
+ As products grow, technical debt compounds. Most frameworks provide no structural answer to this β€” teams are left to manage accumulating complexity by hand.
128
126
 
129
- ## πŸ—‹ Challenges in Modern Development
127
+ A-Concept is built for long-term evolution. Its modular design allows products to adapt, pivot, and scale without compromising the integrity of the underlying architecture.
130
128
 
131
- ### πŸš€ AI Hallucinations and Incorrect Code Outputs
129
+ ### Role Fragmentation and Burnout
132
130
 
133
- The rapid rise of AI tools for code generation has introduced a significant challenge: hallucinations. These occur when AI generates plausible-looking but fundamentally flawed code. While impressive, AI outputs often lack precision and fail to align with the overall architectural vision.
131
+ Developers are routinely expected to operate across every level of abstraction simultaneously β€” from low-level performance work to high-level product decisions. The result is burnout and consistently suboptimal output at every level.
134
132
 
135
- Solution:
136
- A-Concept creates an ecosystem where AI operates within clearly defined boundaries, leveraging self-documenting primitives and an extended C4 model. This ensures that AI’s contributions align with the intended design and functionality.
133
+ A-Concept separates concerns clearly: specialists optimise performance, product-focused engineers drive outcomes, and AI handles routine tasks. Each role operates in its natural domain.
137
134
 
138
- ### πŸ”— The Gap Between Software Design and Implementation
135
+ ### Outdated Development Methodologies
139
136
 
140
- One of the most persistent problems in software development is the disconnect between high-level architectural plans and actual implementation. Traditional methodologies often result in documentation that quickly becomes outdated, leading to chaotic, hard-to-maintain codebases.
137
+ SCRUM and Waterfall were created for a world without AI, remote-first teams, or continuous deployment. They are ritual-heavy, slow to adapt, and poorly matched to modern development realities.
141
138
 
142
- Solution:
143
- A-Concept merges design and implementation into a single, seamless process. The framework’s self-documenting capabilities mean that architecture is always synchronized with the code, offering clarity for both developers and stakeholders.
139
+ A-Concept promotes a streamlined approach β€” leaner processes, AI-assisted execution, and a clear focus on shipping results rather than attending standups.
144
140
 
145
- ### πŸ“ˆ Scaling and Product Evolution
141
+ ---
142
+
143
+ ## Performance
144
+
145
+ Benchmarks measure the core `A_Feature` primitive that underlies every component operation in the engine. All results are from a Node.js environment on standard developer hardware.
146
+
147
+ ### Construction
148
+
149
+ | Benchmark | ops/sec | mean (ms) | Β± % | samples |
150
+ |-----------|--------:|----------:|----:|--------:|
151
+ | new A_Feature (from component) | 65,413 | 0.0153 | Β±11.86% | 47 |
152
+ | new A_Feature (from template, 1 step) | 34,465 | 0.0290 | Β±19.72% | 32 |
153
+ | new A_Feature (from template, 5 steps) | 18,255 | 0.0548 | Β±22.42% | 61 |
154
+
155
+ Construction from a component reference is the fastest path at ~0.015ms per instance. Template-based construction adds parsing overhead β€” roughly 2Γ— for a single step and 3.6Γ— for five steps.
156
+
157
+ ### Sync Execution
158
+
159
+ | Benchmark | ops/sec | mean (ms) | Β± % | samples |
160
+ |-----------|--------:|----------:|----:|--------:|
161
+ | call feature (1 sync step) | 53,673 | 0.0186 | Β±4.55% | 84 |
162
+ | call feature (3 sync extensions) | 58,663 | 0.0170 | Β±2.52% | 89 |
163
+ | call feature (5 sync extensions) | 35,000 | 0.0286 | Β±5.29% | 84 |
146
164
 
147
- Scaling a product over time is a daunting task. As projects grow, technical debt accumulates, making it harder to introduce new features or pivot to meet market demands. Existing frameworks often fail to provide tools that support long-term evolution.
165
+ Sync execution is stable up to 3 extensions with virtually no overhead over a single step. At 5 extensions the cost rises to ~0.029ms β€” still well within a single 16.6ms frame budget.
148
166
 
149
- Solution:
150
- A-Concept introduces an ecosystem built with scalability in mind. Its modular design enables projects to adapt, evolve, and scale without compromising the integrity of the underlying architecture.
167
+ ### Full Lifecycle (construct + execute)
151
168
 
152
- ### πŸ› οΈ Inappropriate Role Combinations and Team Structures
169
+ | Benchmark | ops/sec | mean (ms) | Β± % | samples |
170
+ |-----------|--------:|----------:|----:|--------:|
171
+ | construct + process (1 step) | 50,865 | 0.0197 | Β±11.32% | 71 |
172
+ | construct + process (3 extensions) | 56,259 | 0.0178 | Β±1.53% | 90 |
153
173
 
154
- The industry’s current approach to team roles and responsibilities is often inefficient. Developers juggle multiple hats, ranging from low-level coding to high-level architectural design. This mismatch leads to burnout and suboptimal results.
174
+ The full construct-and-execute lifecycle costs ~0.02ms for both 1 and 3 extensions. The lower variance on the 3-extension run suggests the engine reaches a more stable execution path with multiple extensions.
155
175
 
156
- Solution:
157
- A-Concept reimagines collaboration by enabling developers to focus on their strengths. The framework’s tools allow low-level specialists to optimize performance while product-focused professionals drive business outcomes. AI handles routine tasks, freeing teams to innovate.
176
+ ### Inheritance Impact
158
177
 
159
- ### πŸ—‚ Outdated SDLC Methodologies
178
+ | Benchmark | ops/sec | mean (ms) | Β± % | samples |
179
+ |-----------|--------:|----------:|----:|--------:|
180
+ | construct + process (base class) | 89,174 | 0.0112 | Β±3.17% | 84 |
181
+ | construct + process (1-level child) | 65,307 | 0.0153 | Β±1.57% | 91 |
182
+ | construct + process (2-level grandchild) | 61,470 | 0.0163 | Β±2.57% | 88 |
160
183
 
161
- Traditional methodologies like SCRUM and Waterfall were revolutionary in their time, but they struggle to meet the demands of modern software development. These methodologies are ritual-heavy, time-consuming, and ill-suited for AI-driven development.
184
+ Each inheritance level adds ~0.004ms. This cost is fixed and does not compound with further depth, making inheritance chains predictable.
162
185
 
163
- Solution:
164
- A-Concept promotes a streamlined approach. By leveraging AI and rethinking team structures, we eliminate unnecessary rituals and focus on achieving results. This makes the development process leaner, faster, and more aligned with business goals.
186
+ ### Summary
165
187
 
188
+ | Operation | mean (ms) | ops per 60fps frame |
189
+ |-----------|----------:|--------------------:|
190
+ | Fastest construction | 0.011ms | ~1,500 |
191
+ | Template construction (5 steps) | 0.055ms | ~300 |
192
+ | Full lifecycle (3 extensions) | 0.018ms | ~900 |
193
+ | 2-level inheritance | 0.016ms | ~1,000 |
194
+
195
+ All operations complete well within a single 16.6ms frame budget.
196
+
197
+ ---
198
+
199
+ ## About the Team
200
+
201
+ The [ADAAS R&D](https://adaas.org) team is made up of engineers and architects who have lived through decades of evolving software practices. We built A-Concept out of genuine frustration with tools and methodologies that stopped serving developers β€” and a conviction that the industry deserves something better.
202
+
203
+ ---
166
204
 
167
205
  ## License
168
206
 
169
207
  This project is licensed under the [Apache License 2.0](LICENSE).
170
208
 
171
- © 2025 ADAAS YAZILIM LİMİTED ŞİRKETİ All rights reserved.
172
- All original code and concepts are the intellectual property of ADAAS YAZILIM LİMİTED ŞİRKETİ
209
+ © 2025 ADAAS YAZILIM LİMİTED ŞİRKETİ. All rights reserved.
210
+ All original code and concepts are the intellectual property of ADAAS YAZILIM LİMİTED ŞİRKETİ.
@@ -0,0 +1,245 @@
1
+ /**
2
+ * ============================================================
3
+ * A_Feature Lifecycle Performance Benchmarks
4
+ * ============================================================
5
+ *
6
+ * Measures end-to-end performance of feature creation and execution:
7
+ * - Feature initialization from component
8
+ * - Feature initialization from template
9
+ * - Feature process() execution (sync steps)
10
+ * - Full decorator β†’ resolve β†’ template β†’ process pipeline
11
+ * - Scaling with number of extensions
12
+ */
13
+ import { A_Component } from "@adaas/a-concept/a-component";
14
+ import { A_Feature } from "@adaas/a-concept/a-feature";
15
+ import { A_Scope } from "@adaas/a-concept/a-scope";
16
+ import { A_Dependency } from "@adaas/a-concept/a-dependency";
17
+ import { A_Inject } from "@adaas/a-concept/a-inject";
18
+ import { A_Caller } from "@adaas/a-concept/a-caller";
19
+ import { createSuite, BenchResult } from './helpers';
20
+
21
+
22
+ // ──────────────────────────────────────────────────────────────
23
+ // Fixture Components
24
+ // ──────────────────────────────────────────────────────────────
25
+
26
+ // Simple sync component for pure overhead measurement
27
+ class SimpleComponent extends A_Component {
28
+ counter: number = 0;
29
+
30
+ @A_Feature.Define({ invoke: true })
31
+ @A_Feature.Extend({ name: 'simpleFeature' })
32
+ simpleMethod() {
33
+ this.counter++;
34
+ }
35
+ }
36
+
37
+ // Component with multiple sync extensions
38
+ class ExtA extends A_Component {
39
+ @A_Feature.Extend({ name: 'multiFeature' })
40
+ stepA() { }
41
+ }
42
+
43
+ class ExtB extends A_Component {
44
+ @A_Feature.Extend({ name: 'multiFeature' })
45
+ stepB() { }
46
+ }
47
+
48
+ class ExtC extends A_Component {
49
+ @A_Feature.Extend({ name: 'multiFeature' })
50
+ stepC() { }
51
+ }
52
+
53
+ class ExtD extends A_Component {
54
+ @A_Feature.Extend({ name: 'multiFeature' })
55
+ stepD() { }
56
+ }
57
+
58
+ class ExtE extends A_Component {
59
+ @A_Feature.Extend({ name: 'multiFeature' })
60
+ stepE() { }
61
+ }
62
+
63
+ // Component that defines the multi-feature
64
+ class MultiComponent extends A_Component {
65
+ @A_Feature.Define({ invoke: false })
66
+ async multiFeature() {
67
+ await this.call('multiFeature');
68
+ }
69
+ }
70
+
71
+ // Inheritance chain for testing feature inheritance overhead
72
+ class BaseComp extends A_Component {
73
+ @A_Feature.Define({ invoke: false })
74
+ async inheritedFeature() {
75
+ await this.call('inheritedFeature');
76
+ }
77
+
78
+ @A_Feature.Extend({ name: 'inheritedFeature' })
79
+ baseStep() { }
80
+ }
81
+
82
+ class ChildComp extends BaseComp {
83
+ @A_Feature.Extend({ name: 'inheritedFeature' })
84
+ childStep() { }
85
+ }
86
+
87
+ class GrandchildComp extends ChildComp { }
88
+
89
+
90
+ // ──────────────────────────────────────────────────────────────
91
+ // Benchmark Suites
92
+ // ──────────────────────────────────────────────────────────────
93
+
94
+ export async function runFeatureLifecycleBenchmarks(): Promise<BenchResult[]> {
95
+ const allResults: BenchResult[] = [];
96
+
97
+ // Suite 1: Feature Construction
98
+ const constructionResults = await createSuite('A_Feature β€” Construction', (suite) => {
99
+ const scope = new A_Scope({ name: 'ConstructScope', components: [SimpleComponent] });
100
+ const comp = scope.resolve(SimpleComponent)!;
101
+
102
+ const templateSteps = [
103
+ {
104
+ name: 'SimpleComponent.simpleMethod',
105
+ dependency: new A_Dependency(SimpleComponent),
106
+ handler: 'simpleMethod',
107
+ }
108
+ ];
109
+
110
+ suite
111
+ .add('new A_Feature (from component)', () => {
112
+ new A_Feature({
113
+ name: 'simpleFeature',
114
+ component: comp,
115
+ });
116
+ })
117
+ .add('new A_Feature (from template, 1 step)', () => {
118
+ new A_Feature({
119
+ name: 'benchFeature',
120
+ scope: new A_Scope(),
121
+ template: templateSteps,
122
+ });
123
+ })
124
+ .add('new A_Feature (from template, 5 steps)', () => {
125
+ new A_Feature({
126
+ name: 'benchFeature',
127
+ scope: new A_Scope(),
128
+ template: [
129
+ ...templateSteps,
130
+ { name: 's2', dependency: new A_Dependency(SimpleComponent), handler: 's2' },
131
+ { name: 's3', dependency: new A_Dependency(SimpleComponent), handler: 's3' },
132
+ { name: 's4', dependency: new A_Dependency(SimpleComponent), handler: 's4' },
133
+ { name: 's5', dependency: new A_Dependency(SimpleComponent), handler: 's5' },
134
+ ],
135
+ });
136
+ });
137
+ });
138
+ allResults.push(...constructionResults);
139
+
140
+ // Suite 2: Feature Execution (sync)
141
+ const execResults = await createSuite('A_Feature β€” Sync Execution', (suite) => {
142
+ // 1-step feature
143
+ const scope1 = new A_Scope({ name: 'ExecScope1', components: [SimpleComponent] });
144
+ const comp1 = scope1.resolve(SimpleComponent)!;
145
+
146
+ // Multi-step feature (3 extensions)
147
+ const scope3 = new A_Scope({
148
+ name: 'ExecScope3',
149
+ components: [MultiComponent, ExtA, ExtB, ExtC]
150
+ });
151
+ const comp3 = scope3.resolve(MultiComponent)!;
152
+
153
+ // Multi-step feature (5 extensions)
154
+ const scope5 = new A_Scope({
155
+ name: 'ExecScope5',
156
+ components: [MultiComponent, ExtA, ExtB, ExtC, ExtD, ExtE]
157
+ });
158
+ const comp5 = scope5.resolve(MultiComponent)!;
159
+
160
+ suite
161
+ .add('call feature (1 sync step)', () => {
162
+ comp1.call('simpleFeature');
163
+ })
164
+ .add('call feature (3 sync extensions)', () => {
165
+ comp3.call('multiFeature');
166
+ })
167
+ .add('call feature (5 sync extensions)', () => {
168
+ comp5.call('multiFeature');
169
+ });
170
+ });
171
+ allResults.push(...execResults);
172
+
173
+ // Suite 3: Full lifecycle β€” construction + execution
174
+ const fullResults = await createSuite('A_Feature β€” Full Lifecycle (construct + execute)', (suite) => {
175
+ const scope = new A_Scope({ name: 'FullScope', components: [SimpleComponent] });
176
+ const comp = scope.resolve(SimpleComponent)!;
177
+
178
+ const scope3 = new A_Scope({
179
+ name: 'FullScope3',
180
+ components: [MultiComponent, ExtA, ExtB, ExtC]
181
+ });
182
+ const comp3 = scope3.resolve(MultiComponent)!;
183
+
184
+ suite
185
+ .add('construct + process (1 step)', () => {
186
+ const feature = new A_Feature({
187
+ name: 'simpleFeature',
188
+ component: comp,
189
+ });
190
+ feature.process();
191
+ })
192
+ .add('construct + process (3 extensions)', () => {
193
+ const feature = new A_Feature({
194
+ name: 'multiFeature',
195
+ component: comp3,
196
+ });
197
+ feature.process();
198
+ });
199
+ });
200
+ allResults.push(...fullResults);
201
+
202
+ // Suite 4: Inheritance depth impact on feature lifecycle
203
+ const inheritResults = await createSuite('A_Feature β€” Inheritance Impact', (suite) => {
204
+ const scopeBase = new A_Scope({ name: 'BaseScope', components: [BaseComp] });
205
+ const compBase = scopeBase.resolve(BaseComp)!;
206
+
207
+ const scopeChild = new A_Scope({ name: 'ChildScope', components: [ChildComp] });
208
+ const compChild = scopeChild.resolve(ChildComp)!;
209
+
210
+ const scopeGrand = new A_Scope({ name: 'GrandScope', components: [GrandchildComp] });
211
+ const compGrand = scopeGrand.resolve(GrandchildComp)!;
212
+
213
+ suite
214
+ .add('construct + process (base class)', () => {
215
+ const feature = new A_Feature({
216
+ name: 'inheritedFeature',
217
+ component: compBase,
218
+ });
219
+ feature.process();
220
+ })
221
+ .add('construct + process (1-level child)', () => {
222
+ const feature = new A_Feature({
223
+ name: 'inheritedFeature',
224
+ component: compChild,
225
+ });
226
+ feature.process();
227
+ })
228
+ .add('construct + process (2-level grandchild)', () => {
229
+ const feature = new A_Feature({
230
+ name: 'inheritedFeature',
231
+ component: compGrand,
232
+ });
233
+ feature.process();
234
+ });
235
+ });
236
+ allResults.push(...inheritResults);
237
+
238
+ return allResults;
239
+ }
240
+
241
+
242
+ // Run standalone
243
+ if (require.main === module) {
244
+ runFeatureLifecycleBenchmarks().catch(console.error);
245
+ }