@defai.digital/automatosx 5.3.3 β†’ 5.3.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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,101 @@ All notable changes to AutomatosX will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [5.3.4] - 2025-10-14
9
+
10
+ ### πŸš€ Enhanced Delegation Depth for Coordinators (Phase 2 Pilot)
11
+
12
+ **This release implements Phase 2 of the user-requested delegation enhancements, increasing delegation depth from 1-2 to 3 layers for coordinator agents while maintaining robust safety mechanisms.**
13
+
14
+ #### Added
15
+
16
+ - **3-Layer Delegation Support**:
17
+ - **CTO (Tony)**: Strategic coordinator (`maxDelegationDepth: 3`) - orchestrate multi-phase technical initiatives
18
+ - Layer 1: Direct delegation to implementation teams
19
+ - Layer 2: Coordinated cross-team initiatives
20
+ - Layer 3: Strategic multi-phase projects with sub-coordination
21
+ - **DevOps (Oliver)**: Infrastructure coordinator (`maxDelegationDepth: 3`) - manage complex deployment pipelines
22
+ - Layer 1: Direct delegation to development teams
23
+ - Layer 2: Cross-team infrastructure initiatives
24
+ - Layer 3: Complex deployment pipelines with multiple coordination points
25
+ - **Data Scientist (Dana)**: Data science coordinator (`maxDelegationDepth: 3`) - orchestrate end-to-end ML workflows
26
+ - Layer 1: Direct delegation to data engineer, backend, quality
27
+ - Layer 2: Cross-functional analytics initiatives
28
+ - Layer 3: End-to-end ML pipelines with multiple coordination points
29
+
30
+ - **Improved Depth Enforcement Logic** (`src/agents/executor.ts:755-757`):
31
+ - Changed depth checking from `fromAgent` to delegation chain `initiator`
32
+ - Allows coordinators to delegate through implementers without hitting depth limits
33
+ - Example: CTO (depth 3) β†’ Backend (depth 1) β†’ Frontend (depth 1) β†’ Done βœ…
34
+ - Previously would fail at 2nd delegation due to Backend's depth 1 limit ❌
35
+
36
+ - **Comprehensive Test Coverage**:
37
+ - Created `tests/unit/executor-delegation-depth-3.test.ts` with 15 new tests
38
+ - 5 tests for 3-layer success scenarios
39
+ - 3 tests for 4-layer rejection (exceeds limit)
40
+ - 3 tests for backward compatibility
41
+ - 2 tests for cycle detection at 3 layers
42
+ - 2 tests for delegation chain tracking
43
+ - **All 1,717 tests passing** (100% pass rate)
44
+
45
+ #### Changed
46
+
47
+ - **Agent Configuration Updates**:
48
+ - `.automatosx/agents/cto.yaml`: `maxDelegationDepth: 1 β†’ 3` (strategic coordinator)
49
+ - `.automatosx/agents/devops.yaml`: `maxDelegationDepth: 0 β†’ 3` (infrastructure coordinator)
50
+ - `.automatosx/agents/data-scientist.yaml`: `maxDelegationDepth: 1 β†’ 3` (data science coordinator)
51
+ - Updated system prompts to reflect new coordinator roles
52
+
53
+ - **Delegation Safety**:
54
+ - Existing cycle detection continues to work at all depth levels
55
+ - 4-layer delegation attempts are rejected with clear error messages
56
+ - Implementer agents (Backend, Frontend, etc.) remain at `maxDelegationDepth: 1`
57
+
58
+ #### Fixed
59
+
60
+ - **Windows Provider Detection** (`src/providers/base-provider.ts`):
61
+ - Fixed provider CLI detection on Windows by using cross-platform `findOnPath()` from `cli-provider-detector`
62
+ - Previously, `spawn('claude', ['--version'])` would fail on Windows because Node.js doesn't auto-append `.cmd` extension
63
+ - Now uses `where.exe` + PATHΓ—PATHEXT fallback for proper Windows detection
64
+ - **Impact**: Providers installed via npm on Windows (e.g., `claude.cmd`) are now correctly detected
65
+ - **Issue**: Users could run `claude` in terminal but AutomatosX showed "provider unavailable"
66
+
67
+ #### Documentation
68
+
69
+ - **CLAUDE.md**: Updated Agent Directory & Governance section with v5.3.4 enhancements
70
+ - **CHANGELOG.md**: This entry documenting all Phase 2 changes
71
+
72
+ #### Technical Details
73
+
74
+ **Depth Enforcement Change** (Breaking for test implementations, not user-facing):
75
+
76
+ ```typescript
77
+ // Before (v5.3.3 and earlier):
78
+ const maxDepth = fromAgentProfile.orchestration?.maxDelegationDepth ?? 2;
79
+
80
+ // After (v5.3.4):
81
+ const initiatorName = delegationChain.length > 0 ? delegationChain[0] : request.fromAgent;
82
+ const initiatorProfile = await this.profileLoader.loadProfile(initiatorName);
83
+ const maxDepth = initiatorProfile.orchestration?.maxDelegationDepth ?? 2;
84
+ ```
85
+
86
+ **Impact**: Allows coordinators to orchestrate deep delegation chains through implementers without hitting depth limits. Implementers can still only delegate once, but coordinator's depth limit applies to the entire chain.
87
+
88
+ #### Performance
89
+
90
+ - No performance impact: Logic change is O(1) (single profile lookup)
91
+ - All existing tests passing (1,717 tests, 100% pass rate)
92
+ - Test execution time: ~50s (no regression)
93
+
94
+ #### Migration
95
+
96
+ **100% Backward Compatible** - No action required for existing deployments:
97
+
98
+ - Default `maxDelegationDepth` remains 2 for agents without orchestration config
99
+ - Implementer agents (Backend, Frontend, etc.) remain at depth 1
100
+ - Only 3 coordinator agents updated to depth 3 (CTO, DevOps, Data Scientist)
101
+ - Existing delegation logic fully preserved
102
+
8
103
  ## [5.3.3] - 2025-10-14
9
104
 
10
105
  ### πŸ—οΈ Foundation for Agent Optimization
package/README.md CHANGED
@@ -7,9 +7,9 @@
7
7
  [![npm version](https://img.shields.io/npm/v/@defai.digital/automatosx.svg)](https://www.npmjs.com/package/@defai.digital/automatosx)
8
8
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
9
9
  [![TypeScript](https://img.shields.io/badge/TypeScript-100%25-blue.svg)](https://www.typescriptlang.org/)
10
- [![Tests](https://img.shields.io/badge/tests-1,657%20passing-brightgreen.svg)](#)
10
+ [![Tests](https://img.shields.io/badge/tests-1,717%20passing-brightgreen.svg)](#)
11
11
 
12
- **Status**: βœ… Production Ready Β· v5.3.3 Β· October 2025
12
+ **Status**: βœ… Production Ready Β· v5.3.4 Β· October 2025
13
13
 
14
14
  Looking for answers? See the [FAQ](FAQ.md).
15
15
 
@@ -179,6 +179,7 @@ Product response:
179
179
  ## 🎭 12 Specialized Agents with Clear Governance
180
180
 
181
181
  **v5.0.12 introduces strict role ownership and delegation controls to eliminate cycles**:
182
+ **v5.3.4 Phase 2 Pilot**: 3 coordinator agents now support 3-layer delegation for complex multi-phase workflows
182
183
 
183
184
  ### πŸ’» Engineering Team (Implementers)
184
185
  **maxDelegationDepth: 1** - Can delegate once for cross-domain needs, no re-delegation
@@ -186,12 +187,16 @@ Product response:
186
187
  - Can delegate to: frontend, data, security, quality, devops
187
188
  - **Frank** (frontend) - Component architecture, state management, accessibility
188
189
  - Can delegate to: backend, design, security, quality, devops
189
- - **Oliver** (devops) - Infrastructure as code, CI/CD pipelines, observability
190
+ - **Oliver** (devops) - **πŸ†• v5.3.4: Infrastructure Coordinator (depth 3)** - Orchestrate complex deployment pipelines
190
191
  - Can delegate to: backend, frontend, security, quality
192
+ - 3-layer capability for multi-phase infrastructure workflows
191
193
  - **Daisy** (data) - Data modeling, ETL pipelines, SQL optimization
192
194
  - Can delegate to: backend, security, quality
193
195
  - **Steve** (security) - **Sole owner** of security-audit, threat modeling, secure coding review
194
196
  - Can delegate to: backend, frontend, devops, quality
197
+ - **Dana** (data-scientist) - **πŸ†• v5.3.4: Data Science Coordinator (depth 3)** - End-to-end ML pipelines
198
+ - Can delegate to: data, backend, quality
199
+ - 3-layer capability for complex data science workflows
195
200
 
196
201
  ### 🎯 Quality Team (Coordinator Role)
197
202
  **maxDelegationDepth: 1** - Can delegate fixes back to implementers, no re-delegation
@@ -206,13 +211,16 @@ Product response:
206
211
  - Can delegate to: backend, frontend, design, quality
207
212
 
208
213
  ### πŸ“Š Leadership Team (Coordinators)
209
- **maxDelegationDepth: 1** - Delegate to implementers, focus on strategy, no re-delegation
214
+ **maxDelegationDepth: 1-3** - Delegate to implementers, focus on strategy
210
215
  - **Paris** (product) - Product strategy, feature planning, roadmap
211
216
  - Can delegate to: backend, frontend, design, writer, quality
217
+ - maxDelegationDepth: 1
212
218
  - **Eric** (ceo) - Business strategy, organizational leadership
213
219
  - Can delegate to: paris, tony, all agents
214
- - **Tony** (cto) - Technology strategy, technical leadership
220
+ - maxDelegationDepth: 1
221
+ - **Tony** (cto) - **πŸ†• v5.3.4: Strategic Coordinator (depth 3)** - Multi-phase technical initiatives
215
222
  - Can delegate to: backend, frontend, devops, security, quality
223
+ - 3-layer capability for strategic technology projects with sub-coordination
216
224
 
217
225
  ### πŸ”¬ Research Team (Specialist)
218
226
  **maxDelegationDepth: 0** - Execute research work directly, no delegation
@@ -222,6 +230,8 @@ Product response:
222
230
 
223
231
  **New in v5.0.12**: Each agent has role-specific workflow stages, smart ability loading (abilitySelection), and explicit delegation scopes. Most agents have `maxDelegationDepth: 1` to allow cross-domain collaboration while preventing delegation cycles.
224
232
 
233
+ **New in v5.3.4 (Phase 2 Pilot)**: 3 coordinator agents (Tony/CTO, Oliver/DevOps, Dana/Data Scientist) now support `maxDelegationDepth: 3` for orchestrating complex multi-layer workflows. This enables strategic coordination of multi-phase projects while maintaining safety through depth limits and cycle detection.
234
+
225
235
  [πŸ“– Complete Agent Directory](examples/AGENTS_INFO.md)
226
236
 
227
237
  ---