oneie 1.3.3 → 1.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/.claude/agents/engineering-architect.md +39 -56
- package/.claude/agents/engineering-developer.md +37 -57
- package/.claude/agents/engineering-director.md +37 -144
- package/.claude/agents/engineering-ingestor.md +229 -0
- package/.claude/agents/engineering-quality-assurance.md +40 -206
- package/.claude/agents/engineering-user-experience.md +36 -207
- package/.claude/agents/improver.md +454 -0
- package/.claude/agents/marketing-brand-identity.md +37 -48
- package/.claude/agents/marketing-director.md +9 -0
- package/.claude/agents/one-orchestrator.md +50 -136
- package/.claude/agents/story-teller.md +10 -0
- package/.claude/agents/task-master.md +10 -0
- package/.claude/agents/turbo-repo-builder.md +51 -0
- package/.claude/claude-code-hooks.json +20 -233
- package/.claude/commands/agent-balance +111 -0
- package/.claude/commands/agent.md +24 -7
- package/.claude/commands/cascade-status.md +128 -0
- package/.claude/commands/ingest.md +290 -0
- package/.claude/commands/ingestor.md +136 -0
- package/.claude/commands/mission.md +26 -8
- package/.claude/commands/one.md +351 -14
- package/.claude/commands/quality-check.md +204 -0
- package/.claude/commands/smart-route.md +220 -0
- package/.claude/commands/start.md +9 -8
- package/.claude/commands/story.md +18 -3
- package/.claude/commands/task.md +22 -1
- package/.claude/settings.local.json +18 -3
- package/.obsidian/core-plugins.json +3 -1
- package/.one/checklists/agent-quality-checklist.md +24 -15
- package/.one/checklists/story-quality-checklist.md +24 -15
- package/.one/checklists/task-quality-checklist.md +24 -15
- package/.one/templates/bun-workspace-guide-template.md +188 -0
- package/.one/templates/bunfig-template.toml +95 -0
- package/.one/templates/root-package-template.json +37 -21
- package/.one/templates/turbo-config-template.json +18 -3
- package/.one/tools/bump-core-version.js +0 -0
- package/.one/tools/bump-expansion-version.js +0 -0
- package/.one/tools/code-generators.js +0 -0
- package/.one/tools/compression-engine.js +638 -0
- package/.one/tools/content-deduplicator.js +336 -0
- package/.one/tools/convert-wav-to-mp3.js +0 -0
- package/.one/tools/foundation-wizard.js +0 -0
- package/.one/tools/generate-toc.js +0 -0
- package/.one/tools/ingestor/cascade-integration.js +523 -0
- package/.one/tools/ingestor/cli.ts +234 -0
- package/.one/tools/ingestor/context-mapper.ts +604 -0
- package/.one/tools/ingestor/error-handling-monitor.js +742 -0
- package/.one/tools/ingestor/file-discovery.ts +484 -0
- package/.one/tools/ingestor/file-transformer.ts +524 -0
- package/.one/tools/ingestor/ingestor-orchestrator.ts +416 -0
- package/.one/tools/ingestor/package.json +47 -0
- package/.one/tools/ingestor/usage-examples.md +458 -0
- package/.one/tools/lazy-loader.js +489 -0
- package/.one/tools/minimal-generators.js +0 -0
- package/.one/tools/performance-benchmark.js +300 -0
- package/.one/tools/premium-manager.js +0 -0
- package/.one/tools/semantic-release-sync-installer.js +0 -0
- package/.one/tools/size-memory-optimizer.js +475 -0
- package/.one/tools/sync-installer-version.js +0 -0
- package/.one/tools/text-to-speech.js +0 -0
- package/.one/tools/transformative-ai-engine.js +0 -0
- package/.one/workflows/safe-improvement-deployment.yaml +420 -0
- package/CLAUDE.md +30 -0
- package/README.md +41 -10
- package/one/cache/benchmark-results.json +43 -0
- package/one/cache/file-index.json +12480 -0
- package/one/config/agent-routing.yaml +124 -0
- package/one/config/agent-skills.yaml +451 -0
- package/one/config/cache-config.yaml +304 -0
- package/one/config/feedback-templates.yaml +152 -0
- package/one/config/performance-config.yaml +281 -0
- package/one/config/quality-automation.yaml +405 -0
- package/one/config/routing-logic.yaml +292 -0
- package/one/data/task-registry.yaml +224 -0
- package/one/stories/story-1.10-parallel-task-execution-orchestration.md +119 -0
- package/one/stories/story-3.1-external-repository-foundation.md +374 -0
- package/one/stories/story-3.2-3-levels-architecture-integration.md +449 -0
- package/one/stories/story-3.3-multi-platform-application-development.md +677 -0
- package/one/stories/story-3.4-shared-package-system-ui-components.md +854 -0
- package/one/stories/story-3.5-backend-integration-production-deployment.md +1034 -0
- package/one/tasks/task-1.10.1-design-parallel-execution-architecture.md +108 -0
- package/one/tasks/task-1.10.2-create-task-dependency-mapping-system.md +82 -0
- package/one/tasks/task-1.10.3-build-agent-spawning-orchestration-engine.md +120 -0
- package/one/tasks/task-1.10.4-implement-task-queue-dependency-resolution.md +125 -0
- package/one/tasks/task-1.10.5-create-task-numbering-convention-system.md +542 -0
- package/one/tasks/task-3.1.1-external-repository-creation.md +303 -0
- package/one/tasks/task-3.1.2-turborepo-configuration-optimization.md +402 -0
- package/one/tasks/task-3.1.3-shared-configuration-packages.md +571 -0
- package/one/tasks/task-3.1.4-bun-package-management-optimization.md +627 -0
- package/one/tools/task-numbering-validator.js +429 -0
- package/package.json +1 -1
- package/quality-gate-optimization-analysis.md +260 -0
- package/turbo-benchmark.js +268 -0
- package/turbo-optimization-guide.md +163 -0
- package/turbo-workspace-template.json +83 -0
- package/turbo.json +178 -0
- package/.claude/commands/analyst.md +0 -70
- package/.claude/commands/architect.md +0 -67
- package/.claude/commands/commander.md +0 -78
- package/.claude/commands/deploy.md +0 -68
- package/.claude/commands/dev.md +0 -60
- package/.claude/commands/playbook.md +0 -81
- package/.claude/commands/pm.md +0 -64
- package/.claude/commands/po.md +0 -68
- package/.claude/commands/qa.md +0 -59
- package/.claude/commands/taskmaster.md +0 -85
- package/.claude/commands/ux-expert.md +0 -58
- package/.one/stories/bullstamp-attract-module-complete.md +0 -255
- package/.one/stories/bullstamp-deployment-master-plan.md +0 -518
- package/.one/stories/bullstamp-executive-implementation-summary.md +0 -254
- package/.one/stories/bullstamp-project-status-complete.md +0 -257
- package/.one/stories/obsidian-pandoc-config.md +0 -159
- package/.one/stories/story-1.1-perfect-filesystem-organization.md +0 -270
- package/.one/stories/story-1.1.1.md +0 -136
- package/.one/stories/story-1.1.md +0 -131
- package/.one/stories/story-1.2.md +0 -420
- package/.one/stories/story-1.3.md +0 -177
- package/.one/stories/story-1.4.md +0 -356
- package/.one/stories/story-1.5.md +0 -572
- package/.one/stories/story-1.6.md +0 -481
- package/.one/stories/story-1.7.md +0 -923
- package/.one/stories/story-1.8.md +0 -404
- package/.one/stories/story-2.0.md +0 -132
- package/.one/stories/story-2.1.md +0 -110
- package/.one/stories/story-2.2.md +0 -110
- package/.one/stories/story-2.3.md +0 -112
- package/.one/stories/story-2.4.md +0 -116
- package/.one/stories/story-2.5.md +0 -114
- package/.one/stories/story-3.1.md +0 -298
- package/.one/stories/story-3.10.md +0 -302
- package/.one/stories/story-3.11.md +0 -167
- package/.one/stories/story-3.12.md +0 -235
- package/.one/stories/story-3.13.md +0 -235
- package/.one/stories/story-3.14.md +0 -225
- package/.one/stories/story-3.15.md +0 -238
- package/.one/stories/story-3.16.md +0 -244
- package/.one/stories/story-3.17.md +0 -245
- package/.one/stories/story-3.18.md +0 -248
- package/.one/stories/story-3.2.md +0 -226
- package/.one/stories/story-3.3.md +0 -226
- package/.one/stories/story-3.4.md +0 -226
- package/.one/stories/story-3.5.md +0 -167
- package/.one/stories/story-3.6.md +0 -167
- package/.one/stories/story-3.7.md +0 -181
- package/.one/stories/story-3.8.md +0 -198
- package/.one/stories/story-3.9.md +0 -169
- package/.one/stories/story-4.1.md +0 -245
- package/.one/stories/story-4.2.md +0 -314
- package/.one/stories/story-4.3.md +0 -610
- package/.one/stories/story-4.4.md +0 -931
- package/.one/stories/story-4.5.md +0 -727
- package/.one/stories/story-4.6-consistency.md +0 -175
- package/.one/stories/story-5.1.md +0 -508
- package/.one/stories/story-5.2.md +0 -451
- package/.one/stories/story-5.3.md +0 -405
- package/.one/stories/story-5.4.md +0 -447
- package/.one/stories/story-5.5.md +0 -349
- package/.one/stories/story-5.6.md +0 -445
- package/.one/stories/story-6.1-text-content-engine.md +0 -144
- package/.one/stories/story-6.2-audio-content-engine.md +0 -145
- package/.one/stories/story-6.3-video-content-engine.md +0 -145
- package/.one/stories/story-6.4-visual-content-engine.md +0 -177
- package/.one/stories/story-6.5-cross-platform-distribution.md +0 -188
- package/.one/stories/story-6.6.ai-content-generation-pipeline.md +0 -196
- package/.one/stories/story-6.7-character-consistency-quality-control.md +0 -216
- package/.one/stories/story-6.8-claude-code-content-integration.md +0 -181
- package/.one/stories/story-6.8-content-production-workflows.md +0 -247
- package/.one/stories/story-7.1-implementation.md +0 -128
- package/.one/stories/story-7.1.md +0 -203
- package/.one/stories/story-7.2-implementation.md +0 -147
- package/.one/stories/story-7.2.md +0 -415
- package/.one/stories/story-7.3-implementation.md +0 -159
- package/.one/stories/story-7.3.md +0 -463
- package/.one/stories/story-7.4-implementation.md +0 -154
- package/.one/stories/story-7.4.md +0 -500
- package/.one/stories/story-validation-report.md +0 -169
- package/one/archive-index.json +0 -91
- /package/one/stories/{story-3.1-npx-oneie-turbo-enhancement.md → story-2.1.1-npx-oneie-turbo-enhancement.md} +0 -0
- /package/one/stories/{story-3.2-npx-connection-implementation.md → story-2.21-npx-connection-implementation.md} +0 -0
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
# Task 3.1.1: External Repository Creation
|
|
2
|
+
|
|
3
|
+
**Status:** 📋 READY FOR IMPLEMENTATION
|
|
4
|
+
**Assigned Agent:** DevOps Specialist
|
|
5
|
+
**Story:** Story 3.1: External Repository Setup & Foundation
|
|
6
|
+
**Mission:** Mission-3: Production Turbo Monorepo
|
|
7
|
+
**Estimated Effort:** 1 response cycle
|
|
8
|
+
**Priority:** Critical Foundation
|
|
9
|
+
|
|
10
|
+
## 🎯 Task Objective
|
|
11
|
+
|
|
12
|
+
Create a clean external repository at `/Users/toc/Server/repo` with proper Turbo monorepo directory structure, Git initialization, and Bun workspace configuration, establishing the foundation for modern enterprise development practices.
|
|
13
|
+
|
|
14
|
+
## 📋 Technical Specifications
|
|
15
|
+
|
|
16
|
+
### Primary Deliverables
|
|
17
|
+
|
|
18
|
+
#### 1. Directory Structure Creation
|
|
19
|
+
```bash
|
|
20
|
+
/Users/toc/Server/repo/ # New external repository root
|
|
21
|
+
├── apps/ # Application packages
|
|
22
|
+
│ ├── web/ # Astro 5 - Primary web app
|
|
23
|
+
│ ├── network/ # Next.js 15 - Marketing/content
|
|
24
|
+
│ ├── api/ # Backend API services
|
|
25
|
+
│ ├── desktop/ # Tauri desktop app
|
|
26
|
+
│ └── mobile/ # React Native mobile
|
|
27
|
+
├── packages/ # Shared packages
|
|
28
|
+
│ ├── ui/ # shadcn/ui + Tailwind components
|
|
29
|
+
│ ├── types/ # TypeScript definitions
|
|
30
|
+
│ ├── config/ # Shared configurations
|
|
31
|
+
│ │ ├── typescript/ # @repo/typescript-config
|
|
32
|
+
│ │ ├── eslint/ # @repo/eslint-config
|
|
33
|
+
│ │ └── tailwind/ # @repo/tailwind-config
|
|
34
|
+
│ └── utils/ # Shared utilities
|
|
35
|
+
├── libraries/ # Business logic libraries
|
|
36
|
+
│ ├── content/ # Content management
|
|
37
|
+
│ ├── media/ # Media handling
|
|
38
|
+
│ ├── prompts/ # AI prompt templates
|
|
39
|
+
│ └── agents/ # Agent coordination
|
|
40
|
+
├── databases/ # Database & backend services
|
|
41
|
+
│ └── convex/ # Convex real-time backend
|
|
42
|
+
├── .github/ # GitHub workflows
|
|
43
|
+
│ └── workflows/ # CI/CD pipelines
|
|
44
|
+
├── docs/ # Project documentation
|
|
45
|
+
├── scripts/ # Build and deployment scripts
|
|
46
|
+
└── [configuration files] # Root config files
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
#### 2. Git Repository Initialization
|
|
50
|
+
- Initialize clean Git repository with `git init`
|
|
51
|
+
- Create comprehensive `.gitignore` with Node.js, Bun, and IDE patterns
|
|
52
|
+
- Set up proper Git configuration for monorepo structure
|
|
53
|
+
- Create initial commit with "Initial external repository setup"
|
|
54
|
+
|
|
55
|
+
#### 3. Bun Workspace Configuration
|
|
56
|
+
Create root `package.json` with workspace setup:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"name": "turbo-monorepo",
|
|
61
|
+
"version": "1.0.0",
|
|
62
|
+
"private": true,
|
|
63
|
+
"workspaces": [
|
|
64
|
+
"apps/*",
|
|
65
|
+
"packages/*",
|
|
66
|
+
"libraries/*",
|
|
67
|
+
"databases/*"
|
|
68
|
+
],
|
|
69
|
+
"packageManager": "bun@1.0.0",
|
|
70
|
+
"scripts": {
|
|
71
|
+
"dev": "turbo run dev --parallel",
|
|
72
|
+
"build": "turbo run build",
|
|
73
|
+
"test": "turbo run test",
|
|
74
|
+
"lint": "turbo run lint",
|
|
75
|
+
"clean": "turbo run clean",
|
|
76
|
+
"format": "prettier --write .",
|
|
77
|
+
"type-check": "turbo run type-check"
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"turbo": "latest",
|
|
81
|
+
"prettier": "^3.0.0",
|
|
82
|
+
"@types/node": "^20.0.0",
|
|
83
|
+
"typescript": "^5.0.0"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
#### 4. TypeScript Project References
|
|
89
|
+
Create root `tsconfig.json`:
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"compilerOptions": {
|
|
94
|
+
"target": "ES2022",
|
|
95
|
+
"lib": ["dom", "dom.iterable", "es6"],
|
|
96
|
+
"allowJs": true,
|
|
97
|
+
"skipLibCheck": true,
|
|
98
|
+
"strict": true,
|
|
99
|
+
"forceConsistentCasingInFileNames": true,
|
|
100
|
+
"noEmit": true,
|
|
101
|
+
"esModuleInterop": true,
|
|
102
|
+
"module": "esnext",
|
|
103
|
+
"moduleResolution": "bundler",
|
|
104
|
+
"resolveJsonModule": true,
|
|
105
|
+
"isolatedModules": true,
|
|
106
|
+
"jsx": "preserve",
|
|
107
|
+
"incremental": true,
|
|
108
|
+
"plugins": [
|
|
109
|
+
{
|
|
110
|
+
"name": "next"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"baseUrl": ".",
|
|
114
|
+
"paths": {
|
|
115
|
+
"@/*": ["./src/*"],
|
|
116
|
+
"@repo/ui": ["./packages/ui"],
|
|
117
|
+
"@repo/utils": ["./packages/utils"],
|
|
118
|
+
"@repo/types": ["./packages/types"]
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"include": [
|
|
122
|
+
"**/*.ts",
|
|
123
|
+
"**/*.tsx",
|
|
124
|
+
"**/*.js",
|
|
125
|
+
"**/*.jsx"
|
|
126
|
+
],
|
|
127
|
+
"exclude": [
|
|
128
|
+
"node_modules",
|
|
129
|
+
"dist",
|
|
130
|
+
".next",
|
|
131
|
+
"build"
|
|
132
|
+
],
|
|
133
|
+
"references": [
|
|
134
|
+
{ "path": "./apps/web" },
|
|
135
|
+
{ "path": "./apps/network" },
|
|
136
|
+
{ "path": "./apps/api" },
|
|
137
|
+
{ "path": "./packages/ui" },
|
|
138
|
+
{ "path": "./packages/utils" },
|
|
139
|
+
{ "path": "./packages/types" }
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
#### 5. Essential Configuration Files
|
|
145
|
+
|
|
146
|
+
**`.gitignore`:**
|
|
147
|
+
```
|
|
148
|
+
# Dependencies
|
|
149
|
+
node_modules/
|
|
150
|
+
.pnp
|
|
151
|
+
.pnp.js
|
|
152
|
+
|
|
153
|
+
# Bun
|
|
154
|
+
bun.lockb
|
|
155
|
+
.bun/
|
|
156
|
+
|
|
157
|
+
# Build outputs
|
|
158
|
+
dist/
|
|
159
|
+
build/
|
|
160
|
+
.next/
|
|
161
|
+
out/
|
|
162
|
+
|
|
163
|
+
# Environment variables
|
|
164
|
+
.env
|
|
165
|
+
.env.local
|
|
166
|
+
.env.development.local
|
|
167
|
+
.env.test.local
|
|
168
|
+
.env.production.local
|
|
169
|
+
|
|
170
|
+
# IDE files
|
|
171
|
+
.vscode/
|
|
172
|
+
.idea/
|
|
173
|
+
*.swp
|
|
174
|
+
*.swo
|
|
175
|
+
|
|
176
|
+
# OS files
|
|
177
|
+
.DS_Store
|
|
178
|
+
Thumbs.db
|
|
179
|
+
|
|
180
|
+
# Logs
|
|
181
|
+
*.log
|
|
182
|
+
npm-debug.log*
|
|
183
|
+
yarn-debug.log*
|
|
184
|
+
yarn-error.log*
|
|
185
|
+
lerna-debug.log*
|
|
186
|
+
|
|
187
|
+
# Cache
|
|
188
|
+
.turbo/
|
|
189
|
+
.cache/
|
|
190
|
+
.parcel-cache/
|
|
191
|
+
|
|
192
|
+
# Coverage
|
|
193
|
+
coverage/
|
|
194
|
+
*.lcov
|
|
195
|
+
|
|
196
|
+
# Temporary files
|
|
197
|
+
*.tmp
|
|
198
|
+
*.temp
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**`.npmrc`:**
|
|
202
|
+
```
|
|
203
|
+
registry=https://registry.npmjs.org/
|
|
204
|
+
save-exact=true
|
|
205
|
+
package-lock=false
|
|
206
|
+
prefer-offline=true
|
|
207
|
+
progress=false
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## 🔧 Implementation Steps
|
|
211
|
+
|
|
212
|
+
### Step 1: Directory Creation
|
|
213
|
+
1. Create base directory `/Users/toc/Server/repo`
|
|
214
|
+
2. Create all subdirectories as specified in the structure
|
|
215
|
+
3. Verify permissions are properly set (755 for directories)
|
|
216
|
+
|
|
217
|
+
### Step 2: Git Repository Setup
|
|
218
|
+
1. Navigate to `/Users/toc/Server/repo`
|
|
219
|
+
2. Initialize Git repository: `git init`
|
|
220
|
+
3. Create and populate `.gitignore` file
|
|
221
|
+
4. Stage all initial files: `git add .`
|
|
222
|
+
5. Create initial commit: `git commit -m "Initial external repository setup"`
|
|
223
|
+
|
|
224
|
+
### Step 3: Package Configuration
|
|
225
|
+
1. Create root `package.json` with workspace configuration
|
|
226
|
+
2. Create `tsconfig.json` with project references
|
|
227
|
+
3. Create `.npmrc` with optimization settings
|
|
228
|
+
4. Initialize Bun lockfile: `bun install`
|
|
229
|
+
|
|
230
|
+
### Step 4: Validation
|
|
231
|
+
1. Verify directory structure matches specification exactly
|
|
232
|
+
2. Test Bun workspace recognition: `bun workspaces list`
|
|
233
|
+
3. Validate TypeScript configuration: `tsc --noEmit`
|
|
234
|
+
4. Confirm Git repository status: `git status`
|
|
235
|
+
|
|
236
|
+
## ✅ Quality Criteria
|
|
237
|
+
|
|
238
|
+
### Technical Validation (Must Pass All)
|
|
239
|
+
- [ ] Directory structure matches specification exactly (no missing or extra directories)
|
|
240
|
+
- [ ] Git repository properly initialized with clean working tree
|
|
241
|
+
- [ ] Bun workspace configuration validates without errors
|
|
242
|
+
- [ ] TypeScript project references resolve correctly
|
|
243
|
+
- [ ] All file permissions properly set (directories: 755, files: 644)
|
|
244
|
+
|
|
245
|
+
### Performance Validation
|
|
246
|
+
- [ ] Bun workspace detection under 1 second
|
|
247
|
+
- [ ] TypeScript type checking under 5 seconds (empty project)
|
|
248
|
+
- [ ] Git status commands respond instantly
|
|
249
|
+
- [ ] Directory traversal performance acceptable
|
|
250
|
+
|
|
251
|
+
### Integration Readiness
|
|
252
|
+
- [ ] Workspace structure ready for Turbo configuration
|
|
253
|
+
- [ ] Package.json scripts prepared for task pipeline
|
|
254
|
+
- [ ] TypeScript paths configured for monorepo imports
|
|
255
|
+
- [ ] Git repository ready for CI/CD integration
|
|
256
|
+
|
|
257
|
+
## 🎯 Success Metrics
|
|
258
|
+
|
|
259
|
+
### Quantitative Targets
|
|
260
|
+
- **Setup Time**: Complete task execution under 2 minutes
|
|
261
|
+
- **Validation Time**: All quality checks under 30 seconds
|
|
262
|
+
- **File Count**: Exact match to specification (19 directories, 4 root files)
|
|
263
|
+
- **Git Status**: Clean working tree with no untracked files after initial commit
|
|
264
|
+
|
|
265
|
+
### Qualitative Targets
|
|
266
|
+
- **Clean Architecture**: Professional directory structure following industry standards
|
|
267
|
+
- **Developer Ready**: Foundation prepared for immediate development work
|
|
268
|
+
- **Scalable Foundation**: Structure supports future application and package additions
|
|
269
|
+
- **Integration Ready**: Prepared for subsequent Turbo and build configuration
|
|
270
|
+
|
|
271
|
+
## 🔗 Integration Points
|
|
272
|
+
|
|
273
|
+
### With Story 3.1 Tasks
|
|
274
|
+
- **Task 3.1.2**: Provides foundation for Turbo configuration
|
|
275
|
+
- **Task 3.1.3**: Directory structure ready for shared configuration packages
|
|
276
|
+
- **Task 3.1.4**: Bun workspace configured for package optimization
|
|
277
|
+
- **Task 3.1.5**: Structure ready for development environment setup
|
|
278
|
+
|
|
279
|
+
### With ONE Framework
|
|
280
|
+
- **3 Levels Architecture**: External repo maintains connection to `/Users/toc/Server/ONE`
|
|
281
|
+
- **Agent System**: Foundation prepared for agent accessibility integration
|
|
282
|
+
- **Quality Gates**: Repository structure supports 4-level validation integration
|
|
283
|
+
- **Workflow Integration**: Git and workspace setup ready for ONE workflow connection
|
|
284
|
+
|
|
285
|
+
## 🚨 Critical Success Factors
|
|
286
|
+
|
|
287
|
+
### Must Achieve (Non-Negotiable)
|
|
288
|
+
1. **Perfect Directory Match**: Structure must match specification exactly
|
|
289
|
+
2. **Git Repository Health**: Clean initialization with proper .gitignore
|
|
290
|
+
3. **Bun Workspace Function**: Workspace detection and validation working
|
|
291
|
+
4. **TypeScript Integration**: Project references and path mapping functional
|
|
292
|
+
|
|
293
|
+
### Must Avoid (Failure Conditions)
|
|
294
|
+
1. **Directory Mismatches**: Missing or incorrectly named directories
|
|
295
|
+
2. **Git Issues**: Corrupted repository or missing initial commit
|
|
296
|
+
3. **Workspace Errors**: Bun unable to detect or validate workspace
|
|
297
|
+
4. **Permission Problems**: Incorrect file or directory permissions
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
**Task Foundation**: This task creates the essential foundation for the entire Mission-3 external repository system. All subsequent tasks depend on this foundation being executed perfectly according to specification.
|
|
302
|
+
|
|
303
|
+
**Quality Gate**: 4.0/5.0 stars required - all technical validation criteria must pass before proceeding to Task 3.1.2.
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
# Task 3.1.2: Turborepo Configuration & Optimization
|
|
2
|
+
|
|
3
|
+
**Status:** 📋 READY FOR IMPLEMENTATION
|
|
4
|
+
**Assigned Agent:** Performance Engineer
|
|
5
|
+
**Story:** Story 3.1: External Repository Setup & Foundation
|
|
6
|
+
**Mission:** Mission-3: Production Turbo Monorepo
|
|
7
|
+
**Estimated Effort:** 2 response cycles
|
|
8
|
+
**Priority:** High Performance
|
|
9
|
+
**Dependencies:** Task 3.1.1 (External Repository Creation) ✅
|
|
10
|
+
|
|
11
|
+
## 🎯 Task Objective
|
|
12
|
+
|
|
13
|
+
Configure and optimize Turborepo with advanced caching strategies, task parallelization, and performance optimization to achieve sub-30 second incremental builds and 80%+ remote cache hit rates for enterprise development efficiency.
|
|
14
|
+
|
|
15
|
+
## 📋 Technical Specifications
|
|
16
|
+
|
|
17
|
+
### Primary Deliverables
|
|
18
|
+
|
|
19
|
+
#### 1. Optimized turbo.json Configuration
|
|
20
|
+
|
|
21
|
+
Create comprehensive `turbo.json` with advanced pipeline optimization:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"$schema": "https://turbo.build/schema.json",
|
|
26
|
+
"globalDependencies": ["**/.env.*local", "tsconfig.json", ".eslintrc.js"],
|
|
27
|
+
"globalEnv": ["NODE_ENV", "CI", "VERCEL", "VERCEL_ENV"],
|
|
28
|
+
"pipeline": {
|
|
29
|
+
"build": {
|
|
30
|
+
"dependsOn": ["^build"],
|
|
31
|
+
"env": ["NODE_ENV", "NEXT_PUBLIC_*", "PUBLIC_*"],
|
|
32
|
+
"outputs": [
|
|
33
|
+
"dist/**",
|
|
34
|
+
".next/**",
|
|
35
|
+
"build/**",
|
|
36
|
+
"out/**",
|
|
37
|
+
"target/**"
|
|
38
|
+
],
|
|
39
|
+
"outputMode": "hash-only"
|
|
40
|
+
},
|
|
41
|
+
"dev": {
|
|
42
|
+
"cache": false,
|
|
43
|
+
"persistent": true,
|
|
44
|
+
"env": ["NODE_ENV", "NEXT_PUBLIC_*", "PUBLIC_*", "DATABASE_URL"],
|
|
45
|
+
"dependsOn": ["^build"]
|
|
46
|
+
},
|
|
47
|
+
"start": {
|
|
48
|
+
"cache": false,
|
|
49
|
+
"persistent": true,
|
|
50
|
+
"dependsOn": ["build"]
|
|
51
|
+
},
|
|
52
|
+
"test": {
|
|
53
|
+
"dependsOn": ["^build"],
|
|
54
|
+
"env": ["NODE_ENV", "DATABASE_URL"],
|
|
55
|
+
"outputs": ["coverage/**", "test-results/**"],
|
|
56
|
+
"inputs": [
|
|
57
|
+
"src/**/*.{ts,tsx,js,jsx}",
|
|
58
|
+
"test/**/*.{ts,tsx,js,jsx}",
|
|
59
|
+
"**/__tests__/**/*.{ts,tsx,js,jsx}",
|
|
60
|
+
"**/*.test.{ts,tsx,js,jsx}",
|
|
61
|
+
"**/*.spec.{ts,tsx,js,jsx}"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"test:watch": {
|
|
65
|
+
"cache": false,
|
|
66
|
+
"persistent": true,
|
|
67
|
+
"dependsOn": ["^build"]
|
|
68
|
+
},
|
|
69
|
+
"test:coverage": {
|
|
70
|
+
"dependsOn": ["^build"],
|
|
71
|
+
"env": ["NODE_ENV"],
|
|
72
|
+
"outputs": ["coverage/**"],
|
|
73
|
+
"inputs": [
|
|
74
|
+
"src/**/*.{ts,tsx,js,jsx}",
|
|
75
|
+
"test/**/*.{ts,tsx,js,jsx}"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"lint": {
|
|
79
|
+
"dependsOn": ["^build"],
|
|
80
|
+
"outputs": [".eslintcache"],
|
|
81
|
+
"inputs": [
|
|
82
|
+
"src/**/*.{ts,tsx,js,jsx,json}",
|
|
83
|
+
"**/.eslintrc.{js,json}",
|
|
84
|
+
"**/eslint.config.{js,mjs}",
|
|
85
|
+
"**/tsconfig.json"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"lint:fix": {
|
|
89
|
+
"dependsOn": ["^build"],
|
|
90
|
+
"cache": false,
|
|
91
|
+
"inputs": ["src/**/*.{ts,tsx,js,jsx,json}"]
|
|
92
|
+
},
|
|
93
|
+
"format": {
|
|
94
|
+
"outputs": [],
|
|
95
|
+
"inputs": [
|
|
96
|
+
"src/**/*.{ts,tsx,js,jsx,json,md,mdx}",
|
|
97
|
+
"**/.prettierrc",
|
|
98
|
+
"**/prettier.config.{js,mjs}"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"format:check": {
|
|
102
|
+
"outputs": [],
|
|
103
|
+
"inputs": [
|
|
104
|
+
"src/**/*.{ts,tsx,js,jsx,json,md,mdx}",
|
|
105
|
+
"**/.prettierrc",
|
|
106
|
+
"**/prettier.config.{js,mjs}"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"type-check": {
|
|
110
|
+
"dependsOn": ["^build"],
|
|
111
|
+
"outputs": ["*.tsbuildinfo"],
|
|
112
|
+
"inputs": [
|
|
113
|
+
"src/**/*.{ts,tsx}",
|
|
114
|
+
"**/tsconfig.json",
|
|
115
|
+
"**/*.d.ts"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
"clean": {
|
|
119
|
+
"cache": false,
|
|
120
|
+
"outputs": []
|
|
121
|
+
},
|
|
122
|
+
"db:generate": {
|
|
123
|
+
"cache": false,
|
|
124
|
+
"env": ["DATABASE_URL"]
|
|
125
|
+
},
|
|
126
|
+
"db:push": {
|
|
127
|
+
"cache": false,
|
|
128
|
+
"env": ["DATABASE_URL"]
|
|
129
|
+
},
|
|
130
|
+
"db:migrate": {
|
|
131
|
+
"cache": false,
|
|
132
|
+
"env": ["DATABASE_URL"]
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"remoteCache": {
|
|
136
|
+
"enabled": true,
|
|
137
|
+
"signature": true
|
|
138
|
+
},
|
|
139
|
+
"ui": "tui",
|
|
140
|
+
"daemon": true,
|
|
141
|
+
"envMode": "loose"
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### 2. Remote Caching Configuration
|
|
146
|
+
|
|
147
|
+
**Vercel Integration Setup:**
|
|
148
|
+
```bash
|
|
149
|
+
# .turbo/config.json (auto-generated after first remote cache setup)
|
|
150
|
+
{
|
|
151
|
+
"teamId": "team_xxxx",
|
|
152
|
+
"apiUrl": "https://vercel.com/api",
|
|
153
|
+
"loginUrl": "https://vercel.com",
|
|
154
|
+
"teamSlug": "your-team-name"
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Environment Configuration:**
|
|
159
|
+
```bash
|
|
160
|
+
# .env.example (for team onboarding)
|
|
161
|
+
TURBO_TOKEN=your-vercel-token-here
|
|
162
|
+
TURBO_TEAM=your-team-id-here
|
|
163
|
+
CI=false
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### 3. Performance Optimization Scripts
|
|
167
|
+
|
|
168
|
+
**scripts/turbo-performance.js:**
|
|
169
|
+
```javascript
|
|
170
|
+
#!/usr/bin/env node
|
|
171
|
+
|
|
172
|
+
const { execSync } = require('child_process');
|
|
173
|
+
const fs = require('fs');
|
|
174
|
+
const path = require('path');
|
|
175
|
+
|
|
176
|
+
class TurboPerformanceOptimizer {
|
|
177
|
+
constructor() {
|
|
178
|
+
this.metricsFile = path.join(process.cwd(), '.turbo', 'metrics.json');
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
async optimizeBuildPipeline() {
|
|
182
|
+
console.log('🚀 Optimizing Turbo build pipeline...');
|
|
183
|
+
|
|
184
|
+
// Analyze current performance
|
|
185
|
+
const metrics = await this.analyzeCurrentPerformance();
|
|
186
|
+
|
|
187
|
+
// Optimize based on metrics
|
|
188
|
+
if (metrics.cacheHitRate < 0.8) {
|
|
189
|
+
await this.optimizeCacheConfiguration();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (metrics.averageBuildTime > 30000) {
|
|
193
|
+
await this.optimizeParallelization();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
console.log('✅ Turbo optimization complete');
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
async analyzeCurrentPerformance() {
|
|
200
|
+
const command = 'turbo run build --dry-run=json';
|
|
201
|
+
const result = execSync(command, { encoding: 'utf-8' });
|
|
202
|
+
const data = JSON.parse(result);
|
|
203
|
+
|
|
204
|
+
return {
|
|
205
|
+
cacheHitRate: this.calculateCacheHitRate(data),
|
|
206
|
+
averageBuildTime: this.calculateAverageBuildTime(data),
|
|
207
|
+
parallelizationEfficiency: this.calculateParallelization(data)
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
calculateCacheHitRate(data) {
|
|
212
|
+
// Implementation for cache hit rate calculation
|
|
213
|
+
return data.tasks.filter(t => t.cache.status === 'HIT').length / data.tasks.length;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
calculateAverageBuildTime(data) {
|
|
217
|
+
// Implementation for build time calculation
|
|
218
|
+
const times = data.tasks.map(t => t.execution?.duration || 0);
|
|
219
|
+
return times.reduce((a, b) => a + b, 0) / times.length;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
async optimizeCacheConfiguration() {
|
|
223
|
+
console.log('📈 Optimizing cache configuration...');
|
|
224
|
+
// Implementation for cache optimization
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
async optimizeParallelization() {
|
|
228
|
+
console.log('⚡ Optimizing task parallelization...');
|
|
229
|
+
// Implementation for parallelization optimization
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
module.exports = TurboPerformanceOptimizer;
|
|
234
|
+
|
|
235
|
+
// CLI execution
|
|
236
|
+
if (require.main === module) {
|
|
237
|
+
const optimizer = new TurboPerformanceOptimizer();
|
|
238
|
+
optimizer.optimizeBuildPipeline().catch(console.error);
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
#### 4. Advanced Task Dependency Optimization
|
|
243
|
+
|
|
244
|
+
**Task Dependency Graph Analysis:**
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"optimization": {
|
|
248
|
+
"parallel_tasks": [
|
|
249
|
+
["lint", "type-check", "format:check"],
|
|
250
|
+
["test", "build"],
|
|
251
|
+
["db:generate", "db:push"]
|
|
252
|
+
],
|
|
253
|
+
"sequential_requirements": {
|
|
254
|
+
"build": ["^build"],
|
|
255
|
+
"test": ["build"],
|
|
256
|
+
"dev": ["^build"]
|
|
257
|
+
},
|
|
258
|
+
"cache_strategies": {
|
|
259
|
+
"aggressive": ["build", "test", "lint", "type-check"],
|
|
260
|
+
"moderate": ["format", "format:check"],
|
|
261
|
+
"disabled": ["dev", "start", "clean"]
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## 🔧 Implementation Steps
|
|
268
|
+
|
|
269
|
+
### Step 1: Core Turbo Configuration
|
|
270
|
+
1. Create optimized `turbo.json` with advanced pipeline configuration
|
|
271
|
+
2. Configure global dependencies and environment variables
|
|
272
|
+
3. Set up comprehensive task definitions with proper dependencies
|
|
273
|
+
4. Enable remote caching with Vercel integration
|
|
274
|
+
|
|
275
|
+
### Step 2: Performance Optimization Setup
|
|
276
|
+
1. Create performance monitoring scripts
|
|
277
|
+
2. Configure cache optimization strategies
|
|
278
|
+
3. Set up build time monitoring and alerting
|
|
279
|
+
4. Implement parallelization analysis tools
|
|
280
|
+
|
|
281
|
+
### Step 3: Remote Caching Integration
|
|
282
|
+
1. Set up Vercel remote caching (if available)
|
|
283
|
+
2. Configure team-wide cache sharing
|
|
284
|
+
3. Implement cache signature validation
|
|
285
|
+
4. Set up fallback caching strategies
|
|
286
|
+
|
|
287
|
+
### Step 4: Validation and Testing
|
|
288
|
+
1. Run comprehensive build pipeline tests
|
|
289
|
+
2. Validate cache hit rates and build performance
|
|
290
|
+
3. Test parallel execution efficiency
|
|
291
|
+
4. Verify remote caching functionality
|
|
292
|
+
|
|
293
|
+
## 🎯 Performance Targets
|
|
294
|
+
|
|
295
|
+
### Build Performance Requirements
|
|
296
|
+
- **Incremental Build Time**: Under 30 seconds (target: 15-20 seconds)
|
|
297
|
+
- **Cold Build Time**: Under 2 minutes for full monorepo
|
|
298
|
+
- **Cache Hit Rate**: 80%+ for team development scenarios
|
|
299
|
+
- **Parallel Efficiency**: 90%+ CPU utilization during builds
|
|
300
|
+
|
|
301
|
+
### Caching Optimization Targets
|
|
302
|
+
- **Local Cache**: 95%+ hit rate for unchanged code
|
|
303
|
+
- **Remote Cache**: 80%+ hit rate for team collaboration
|
|
304
|
+
- **Cache Storage**: Under 500MB for typical development workflow
|
|
305
|
+
- **Cache Retrieval**: Under 2 seconds for large cached builds
|
|
306
|
+
|
|
307
|
+
### Task Execution Metrics
|
|
308
|
+
- **Task Startup Time**: Under 100ms per task
|
|
309
|
+
- **Dependency Resolution**: Under 500ms for complex dependency graphs
|
|
310
|
+
- **Parallel Task Count**: 80% of available CPU cores utilized
|
|
311
|
+
- **Memory Usage**: Under 2GB RAM for full build pipeline
|
|
312
|
+
|
|
313
|
+
## ✅ Quality Criteria
|
|
314
|
+
|
|
315
|
+
### Technical Validation (Must Pass All)
|
|
316
|
+
- [ ] turbo.json configuration validates without errors or warnings
|
|
317
|
+
- [ ] All task dependencies properly defined and tested
|
|
318
|
+
- [ ] Remote caching properly configured and functional
|
|
319
|
+
- [ ] Performance monitoring scripts execute successfully
|
|
320
|
+
- [ ] Build pipeline completes without errors across all packages
|
|
321
|
+
|
|
322
|
+
### Performance Validation
|
|
323
|
+
- [ ] Incremental builds complete under 30 seconds
|
|
324
|
+
- [ ] Cache hit rate exceeds 80% in team development scenarios
|
|
325
|
+
- [ ] Parallel task execution utilizes available CPU cores efficiently
|
|
326
|
+
- [ ] Memory usage remains within acceptable limits during builds
|
|
327
|
+
|
|
328
|
+
### Integration Validation
|
|
329
|
+
- [ ] All workspace packages properly integrated into Turbo pipeline
|
|
330
|
+
- [ ] Environment variable scoping works correctly across tasks
|
|
331
|
+
- [ ] Task outputs properly cached and retrieved
|
|
332
|
+
- [ ] Remote caching synchronizes correctly across team members
|
|
333
|
+
|
|
334
|
+
## 🚨 Critical Performance Optimizations
|
|
335
|
+
|
|
336
|
+
### Cache Strategy Optimization
|
|
337
|
+
```json
|
|
338
|
+
{
|
|
339
|
+
"cache_optimization": {
|
|
340
|
+
"inputs_fine_tuning": {
|
|
341
|
+
"exclude_patterns": [
|
|
342
|
+
"**/*.log",
|
|
343
|
+
"**/*.tmp",
|
|
344
|
+
"**/node_modules",
|
|
345
|
+
"**/.git",
|
|
346
|
+
"**/.DS_Store"
|
|
347
|
+
],
|
|
348
|
+
"include_critical": [
|
|
349
|
+
"src/**/*.{ts,tsx,js,jsx}",
|
|
350
|
+
"package.json",
|
|
351
|
+
"tsconfig.json",
|
|
352
|
+
"*.config.{js,ts,mjs}"
|
|
353
|
+
]
|
|
354
|
+
},
|
|
355
|
+
"outputs_optimization": {
|
|
356
|
+
"hash_only_mode": ["build", "test"],
|
|
357
|
+
"full_outputs": ["test:coverage"],
|
|
358
|
+
"no_cache": ["dev", "start", "clean"]
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Parallelization Strategy
|
|
365
|
+
- **Level 1**: Independent tasks run in parallel (lint, type-check, format)
|
|
366
|
+
- **Level 2**: Dependent tasks execute after prerequisites complete
|
|
367
|
+
- **Level 3**: Package-level parallelization across monorepo apps
|
|
368
|
+
- **Level 4**: Task-internal parallelization for complex operations
|
|
369
|
+
|
|
370
|
+
## 🔗 Integration Points
|
|
371
|
+
|
|
372
|
+
### With Story 3.1 Tasks
|
|
373
|
+
- **Task 3.1.1**: Uses repository structure and package.json workspace configuration
|
|
374
|
+
- **Task 3.1.3**: Integrates with shared configuration packages for consistent task execution
|
|
375
|
+
- **Task 3.1.4**: Leverages Bun package management for optimal dependency resolution
|
|
376
|
+
- **Task 3.1.5**: Provides foundation for development environment automation
|
|
377
|
+
|
|
378
|
+
### With ONE Framework Quality Gates
|
|
379
|
+
- **Mission Level**: Turbo pipeline supports mission-level validation workflows
|
|
380
|
+
- **Story Level**: Build performance metrics integrate with story completion criteria
|
|
381
|
+
- **Task Level**: Individual task execution monitored and validated
|
|
382
|
+
- **Agent Level**: Agent deployment pipelines leverage optimized build processes
|
|
383
|
+
|
|
384
|
+
## 🎯 Success Metrics
|
|
385
|
+
|
|
386
|
+
### Quantitative Measures
|
|
387
|
+
- **Build Speed**: 3x faster than traditional monorepo setups
|
|
388
|
+
- **Cache Efficiency**: 80%+ remote cache hit rate sustained over 1 week
|
|
389
|
+
- **Resource Usage**: Optimal CPU/memory utilization during parallel builds
|
|
390
|
+
- **Team Productivity**: 50% reduction in "waiting for builds" time
|
|
391
|
+
|
|
392
|
+
### Qualitative Measures
|
|
393
|
+
- **Developer Experience**: Instant feedback on code changes
|
|
394
|
+
- **Reliability**: Consistent build results across different environments
|
|
395
|
+
- **Scalability**: Performance maintained as packages are added
|
|
396
|
+
- **Maintainability**: Clear task dependencies and optimization pathways
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
**Task Performance Focus**: This task establishes the high-performance foundation that makes the entire monorepo development experience fast, efficient, and scalable. The optimizations implemented here directly impact developer productivity and team collaboration effectiveness.
|
|
401
|
+
|
|
402
|
+
**Quality Gate**: 4.0/5.0 stars required - all performance targets and technical validation criteria must be met before proceeding to Task 3.1.3.
|