erne-universal 0.12.2 → 0.12.3
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/docs/commands.md +25 -24
- package/lib/detect.js +47 -20
- package/package.json +1 -1
package/docs/commands.md
CHANGED
|
@@ -7,39 +7,40 @@ Commands are slash-prefixed actions that orchestrate agents for specific tasks.
|
|
|
7
7
|
### Core Workflow
|
|
8
8
|
| Command | Purpose | Agents |
|
|
9
9
|
|---------|---------|--------|
|
|
10
|
-
| `/plan` | Design feature architecture | architect |
|
|
11
|
-
| `/code` | Implement features | senior-developer |
|
|
12
|
-
| `/feature` | Build focused feature unit | feature-builder |
|
|
13
|
-
| `/code-review` | Full code review | code-reviewer + performance-profiler |
|
|
14
|
-
| `/tdd` | Test-first development | tdd-guide |
|
|
15
|
-
| `/build-fix` | Fix build failures | expo-config-resolver |
|
|
16
|
-
| `/perf` | Performance profiling | performance-profiler |
|
|
17
|
-
| `/upgrade` | Version migration | upgrade-assistant |
|
|
18
|
-
| `/native-module` | Create native modules | native-bridge-builder → code-reviewer |
|
|
19
|
-
| `/navigate` | Navigation design | architect |
|
|
10
|
+
| `/erne-plan` | Design feature architecture | architect |
|
|
11
|
+
| `/erne-code` | Implement features | senior-developer |
|
|
12
|
+
| `/erne-feature` | Build focused feature unit | feature-builder |
|
|
13
|
+
| `/erne-code-review` | Full code review | code-reviewer + performance-profiler |
|
|
14
|
+
| `/erne-tdd` | Test-first development | tdd-guide |
|
|
15
|
+
| `/erne-build-fix` | Fix build failures | expo-config-resolver |
|
|
16
|
+
| `/erne-perf` | Performance profiling | performance-profiler |
|
|
17
|
+
| `/erne-upgrade` | Version migration | upgrade-assistant |
|
|
18
|
+
| `/erne-native-module` | Create native modules | native-bridge-builder → code-reviewer |
|
|
19
|
+
| `/erne-navigate` | Navigation design | architect |
|
|
20
20
|
|
|
21
21
|
### Extended
|
|
22
22
|
| Command | Purpose | Agents |
|
|
23
23
|
|---------|---------|--------|
|
|
24
|
-
| `/animate` | Implement animations | ui-designer |
|
|
25
|
-
| `/deploy` | Validate and submit | expo-config-resolver + code-reviewer |
|
|
26
|
-
| `/component` | Design + test component | ui-designer + tdd-guide |
|
|
27
|
-
| `/debug` | Systematic diagnosis | performance-profiler |
|
|
28
|
-
| `/quality-gate` | Pre-merge checks | code-reviewer + performance-profiler |
|
|
29
|
-
| `/orchestrate` | Run multi-agent pipeline | pipeline-orchestrator |
|
|
24
|
+
| `/erne-animate` | Implement animations | ui-designer |
|
|
25
|
+
| `/erne-deploy` | Validate and submit | expo-config-resolver + code-reviewer |
|
|
26
|
+
| `/erne-component` | Design + test component | ui-designer + tdd-guide |
|
|
27
|
+
| `/erne-debug` | Systematic diagnosis | performance-profiler |
|
|
28
|
+
| `/erne-quality-gate` | Pre-merge checks | code-reviewer + performance-profiler |
|
|
29
|
+
| `/erne-orchestrate` | Run multi-agent pipeline | pipeline-orchestrator |
|
|
30
|
+
| `/erne-hig` | Apple HIG design intelligence | ui-designer (HIG rules) |
|
|
30
31
|
|
|
31
32
|
### Script-Driven
|
|
32
33
|
| Command | Purpose | What It Runs |
|
|
33
34
|
|---------|---------|-------------|
|
|
34
|
-
| `/learn` | Generate skills from patterns | continuous-learning-v2 scripts |
|
|
35
|
-
| `/retrospective` | Session analysis | evaluate-session.js |
|
|
36
|
-
| `/setup-device` | Install agent-device MCP | Setup script |
|
|
35
|
+
| `/erne-learn` | Generate skills from patterns | continuous-learning-v2 scripts |
|
|
36
|
+
| `/erne-retrospective` | Session analysis | evaluate-session.js |
|
|
37
|
+
| `/erne-setup-device` | Install agent-device MCP | Setup script |
|
|
37
38
|
|
|
38
39
|
## Using Commands
|
|
39
40
|
|
|
40
41
|
Type any command in Claude Code:
|
|
41
42
|
```
|
|
42
|
-
/plan Add user authentication with biometric login
|
|
43
|
+
/erne-plan Add user authentication with biometric login
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
Commands that use multiple agents show combined output. Parallel agents run simultaneously for speed.
|
|
@@ -50,7 +51,7 @@ When agent-device MCP is installed, several commands gain visual capabilities:
|
|
|
50
51
|
|
|
51
52
|
| Command | Without | With agent-device |
|
|
52
53
|
|---------|---------|------------------|
|
|
53
|
-
| `/debug` | Log analysis | + Screenshots, tap through steps |
|
|
54
|
-
| `/perf` | Code analysis | + Actual FPS measurement |
|
|
55
|
-
| `/component` | Generate code | + Render and screenshot |
|
|
56
|
-
| `/deploy` | Config validation | + Preview build verification |
|
|
54
|
+
| `/erne-debug` | Log analysis | + Screenshots, tap through steps |
|
|
55
|
+
| `/erne-perf` | Code analysis | + Actual FPS measurement |
|
|
56
|
+
| `/erne-component` | Generate code | + Render and screenshot |
|
|
57
|
+
| `/erne-deploy` | Config validation | + Preview build verification |
|
package/lib/detect.js
CHANGED
|
@@ -44,15 +44,19 @@ function detectProject(cwd) {
|
|
|
44
44
|
return result;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
let deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
48
48
|
|
|
49
49
|
// --- Framework detection ---
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
let hasExpo = !!deps['expo'];
|
|
51
|
+
let hasRN = !!deps['react-native'];
|
|
52
|
+
|
|
53
|
+
// Track the effective project directory for stack detection.
|
|
54
|
+
// In a monorepo, this may point to a workspace package instead of the root.
|
|
55
|
+
let projectDir = cwd;
|
|
56
|
+
let projectPkg = pkg;
|
|
52
57
|
|
|
53
58
|
if (hasExpo) {
|
|
54
59
|
result.isRNProject = true;
|
|
55
|
-
// Check for native code to distinguish bare vs managed
|
|
56
60
|
if (hasNativeCode(cwd)) {
|
|
57
61
|
result.framework = 'expo-bare';
|
|
58
62
|
} else {
|
|
@@ -61,11 +65,39 @@ function detectProject(cwd) {
|
|
|
61
65
|
} else if (hasRN) {
|
|
62
66
|
result.isRNProject = true;
|
|
63
67
|
result.framework = 'bare-rn';
|
|
64
|
-
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// --- Monorepo detection (runs regardless of root RN presence) ---
|
|
71
|
+
const monorepoInfo = detectMonorepo(cwd, pkg);
|
|
72
|
+
result.hasMonorepo = monorepoInfo !== null;
|
|
73
|
+
result.monorepo = monorepoInfo;
|
|
74
|
+
|
|
75
|
+
// If root has no RN/Expo but a workspace package does, use that package for detection
|
|
76
|
+
if (!result.isRNProject && monorepoInfo) {
|
|
77
|
+
const rnPkg = monorepoInfo.packages.find(p => p.hasExpo || p.hasReactNative);
|
|
78
|
+
if (rnPkg) {
|
|
79
|
+
projectDir = path.join(cwd, rnPkg.path);
|
|
80
|
+
try {
|
|
81
|
+
projectPkg = JSON.parse(fs.readFileSync(path.join(projectDir, 'package.json'), 'utf8'));
|
|
82
|
+
deps = { ...projectPkg.dependencies, ...projectPkg.devDependencies };
|
|
83
|
+
hasExpo = !!deps['expo'];
|
|
84
|
+
hasRN = !!deps['react-native'];
|
|
85
|
+
|
|
86
|
+
result.isRNProject = true;
|
|
87
|
+
if (hasExpo) {
|
|
88
|
+
result.framework = hasNativeCode(projectDir) ? 'expo-bare' : 'expo-managed';
|
|
89
|
+
} else {
|
|
90
|
+
result.framework = 'bare-rn';
|
|
91
|
+
}
|
|
92
|
+
} catch { /* workspace package.json unreadable, remain non-RN */ }
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (!result.isRNProject) {
|
|
65
97
|
return result;
|
|
66
98
|
}
|
|
67
99
|
|
|
68
|
-
// --- Stack detection ---
|
|
100
|
+
// --- Stack detection (uses deps from the effective project) ---
|
|
69
101
|
// State
|
|
70
102
|
if (deps['zustand']) result.stack.state = 'zustand';
|
|
71
103
|
else if (deps['@reduxjs/toolkit']) result.stack.state = 'redux-toolkit';
|
|
@@ -105,27 +137,22 @@ function detectProject(cwd) {
|
|
|
105
137
|
if (deps['@testing-library/react-native']) result.stack.testing = 'jest-rntl';
|
|
106
138
|
else if (deps['detox']) result.stack.testing = 'jest-detox';
|
|
107
139
|
|
|
108
|
-
// Build
|
|
109
|
-
if (fs.existsSync(path.join(cwd, 'eas.json'))) result.stack.build = 'eas';
|
|
110
|
-
else if (fs.existsSync(path.join(cwd, 'fastlane'))) result.stack.build = 'fastlane';
|
|
140
|
+
// Build — check both root and project dir for build configs
|
|
141
|
+
if (fs.existsSync(path.join(cwd, 'eas.json')) || fs.existsSync(path.join(projectDir, 'eas.json'))) result.stack.build = 'eas';
|
|
142
|
+
else if (fs.existsSync(path.join(cwd, 'fastlane')) || fs.existsSync(path.join(projectDir, 'fastlane'))) result.stack.build = 'fastlane';
|
|
111
143
|
|
|
112
144
|
// --- Metadata ---
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
-
result.hasMonorepo = monorepoInfo !== null;
|
|
116
|
-
result.monorepo = monorepoInfo;
|
|
117
|
-
|
|
118
|
-
// TypeScript
|
|
119
|
-
result.hasTypescript = fs.existsSync(path.join(cwd, 'tsconfig.json'));
|
|
145
|
+
// TypeScript — check both root and project dir
|
|
146
|
+
result.hasTypescript = fs.existsSync(path.join(cwd, 'tsconfig.json')) || fs.existsSync(path.join(projectDir, 'tsconfig.json'));
|
|
120
147
|
|
|
121
148
|
// Existing CLAUDE.md
|
|
122
149
|
result.existingClaudeMd = fs.existsSync(path.join(cwd, 'CLAUDE.md'));
|
|
123
150
|
|
|
124
|
-
// New Architecture
|
|
125
|
-
result.hasNewArch = detectNewArch(
|
|
151
|
+
// New Architecture — check against the effective project
|
|
152
|
+
result.hasNewArch = detectNewArch(projectDir, projectPkg);
|
|
126
153
|
|
|
127
|
-
// Component style
|
|
128
|
-
result.componentStyle = detectComponentStyle(
|
|
154
|
+
// Component style — scan the effective project dir
|
|
155
|
+
result.componentStyle = detectComponentStyle(projectDir);
|
|
129
156
|
|
|
130
157
|
return result;
|
|
131
158
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "erne-universal",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"description": "Complete AI coding agent harness for React Native and Expo \u2014 13 specialized agents, autonomous worker mode, visual debugging, smart routing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|