oneie 3.5.0 → 3.6.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.
Files changed (141) hide show
  1. package/.claude/agents/agent-director.md +902 -22
  2. package/.claude/agents/agent-onboard-example-output.md +600 -0
  3. package/.claude/agents/agent-onboard.md +576 -0
  4. package/.claude/commands/ONBOARDING_ENHANCEMENT_SUMMARY.md +266 -0
  5. package/.claude/commands/deploy.md +77 -150
  6. package/.claude/commands/one.md +375 -5
  7. package/.claude/commands/release.md +64 -3
  8. package/.mcp.json +57 -0
  9. package/CLAUDE.md +55 -69
  10. package/CREATE-WEBSITE.md +442 -0
  11. package/SECURITY.md +31 -0
  12. package/TESTING-ONBOARDING.md +185 -0
  13. package/dist/commands/create-website.d.ts +19 -0
  14. package/dist/commands/create-website.d.ts.map +1 -0
  15. package/dist/commands/create-website.js +231 -0
  16. package/dist/commands/create-website.js.map +1 -0
  17. package/dist/commands/init.d.ts +5 -6
  18. package/dist/commands/init.d.ts.map +1 -1
  19. package/dist/commands/init.js +213 -103
  20. package/dist/commands/init.js.map +1 -1
  21. package/dist/index.js +7 -5
  22. package/dist/index.js.map +1 -1
  23. package/dist/utils/installation-setup.d.ts +24 -1
  24. package/dist/utils/installation-setup.d.ts.map +1 -1
  25. package/dist/utils/installation-setup.js +85 -1
  26. package/dist/utils/installation-setup.js.map +1 -1
  27. package/dist/utils/launch-claude.d.ts +6 -0
  28. package/dist/utils/launch-claude.d.ts.map +1 -0
  29. package/dist/utils/launch-claude.js +51 -0
  30. package/dist/utils/launch-claude.js.map +1 -0
  31. package/dist/utils/validation.d.ts +48 -0
  32. package/dist/utils/validation.d.ts.map +1 -0
  33. package/dist/utils/validation.js +73 -0
  34. package/dist/utils/validation.js.map +1 -0
  35. package/folders.yaml +1 -1
  36. package/one/.obsidian/core-plugins.json +33 -0
  37. package/one/.obsidian/workspace.json +20 -20
  38. package/one/connections/workflow-onboarding.md +683 -0
  39. package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +354 -0
  40. package/one/events/CRITICAL-FIXES-COMPLETE.md +504 -0
  41. package/one/events/DEPLOYMENT.md +178 -0
  42. package/one/events/ECOMMERCE-DEMO-PLAN.md +225 -0
  43. package/one/events/ECOMMERCE-LIVE-DEMO.md +363 -0
  44. package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +735 -0
  45. package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +923 -0
  46. package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +223 -0
  47. package/one/events/HANDOFF.md +313 -0
  48. package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +503 -0
  49. package/one/events/IMPLEMENTATION_SUMMARY.md +529 -0
  50. package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +666 -0
  51. package/one/events/LANDING-PAGE-IMPLEMENTATION.md +642 -0
  52. package/one/events/LANDING-PAGE-QUICKSTART.md +407 -0
  53. package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +1627 -0
  54. package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +573 -0
  55. package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +398 -0
  56. package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +525 -0
  57. package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +455 -0
  58. package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +486 -0
  59. package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +203 -0
  60. package/one/events/SECURITY-AUDIT-FIXES.md +376 -0
  61. package/one/events/SECURITY-SCAN-COMPLETE.md +281 -0
  62. package/one/events/SHOP-BUILD-STATUS.md +114 -0
  63. package/one/events/SHOP-PREMIUM-UPDATE.md +149 -0
  64. package/one/events/SITE-WIDE-GRADIENT-FIX.md +299 -0
  65. package/one/events/STORE-PRODUCTION-READY-STATUS.md +359 -0
  66. package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +429 -0
  67. package/one/events/agent-director-enhancement-summary.md +386 -0
  68. package/one/events/agent-onboard-implementation-summary.md +457 -0
  69. package/one/events/clean-agent-ontology-cleanup-report.md +353 -0
  70. package/one/events/landing-page-generator.md +458 -0
  71. package/one/events/onboarding-implementation-complete.md +505 -0
  72. package/one/events/release.md +254 -0
  73. package/one/events/separate-implementation-status.md +537 -0
  74. package/one/knowledge/100-inference-quick-reference.md +431 -0
  75. package/one/knowledge/agent-onboard-usage.md +612 -0
  76. package/one/knowledge/cli-claude-handoff.md +718 -0
  77. package/one/knowledge/ontology-blog.yaml +31 -0
  78. package/one/knowledge/ontology-cheatsheet.md +591 -0
  79. package/one/knowledge/ontology-community.yaml +42 -0
  80. package/one/knowledge/ontology-core-universal.md +722 -0
  81. package/one/knowledge/ontology-core.yaml +50 -0
  82. package/one/knowledge/ontology-courses.yaml +53 -0
  83. package/one/knowledge/ontology-creator.md +376 -0
  84. package/one/knowledge/ontology-developer-guide.md +789 -0
  85. package/one/knowledge/ontology-education.md +920 -0
  86. package/one/knowledge/ontology-index.md +354 -0
  87. package/one/knowledge/ontology-migration-guide.md +811 -0
  88. package/one/knowledge/ontology-minimal.yaml +1 -1
  89. package/one/knowledge/ontology-portfolio.yaml +31 -0
  90. package/one/knowledge/ontology-quickstart.md +576 -0
  91. package/one/knowledge/ontology-shop.yaml +121 -0
  92. package/one/knowledge/ontology-tokens.yaml +32 -0
  93. package/one/knowledge/ontology-tutorial.md +434 -0
  94. package/one/knowledge/ontology-video-script.md +890 -0
  95. package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +467 -0
  96. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +408 -0
  97. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +369 -0
  98. package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +396 -0
  99. package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +468 -0
  100. package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +582 -0
  101. package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +449 -0
  102. package/one/things/docs/ecommerce/QUICK-START.md +368 -0
  103. package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +498 -0
  104. package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +237 -0
  105. package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +171 -0
  106. package/one/things/docs/ecommerce/demo.astro +309 -0
  107. package/one/things/plans/agent-director-100-inference-plans.md +410 -0
  108. package/one/things/plans/dual-website-strategy.md +612 -0
  109. package/one/things/plans/feature-based-sites.md +821 -0
  110. package/one/things/plans/multi-ontology-architecture.md +836 -0
  111. package/one/things/plans/onboarding.md +32 -0
  112. package/one/things/plans/separate.md +15 -17
  113. package/one/things/plans/start-new.md +738 -0
  114. package/package.json +7 -2
  115. package/one/things/claude/hooks/agent-hook-manager.js +0 -525
  116. package/one/things/claude/hooks/agent-load-balancer.js +0 -271
  117. package/one/things/claude/hooks/agent-request-interceptor.js +0 -70
  118. package/one/things/claude/hooks/cascade-feedback.js +0 -297
  119. package/one/things/claude/hooks/cascade-integration-hooks.js +0 -648
  120. package/one/things/claude/hooks/continuous-improvement-monitor.js +0 -510
  121. package/one/things/claude/hooks/file-organization-engine.js +0 -427
  122. package/one/things/claude/hooks/file-organization-monitor.js +0 -269
  123. package/one/things/claude/hooks/hook-config-manager.js +0 -202
  124. package/one/things/claude/hooks/hook-orchestrator.js +0 -662
  125. package/one/things/claude/hooks/hook-performance-report.js +0 -120
  126. package/one/things/claude/hooks/mcp-cascade-integration.js +0 -816
  127. package/one/things/claude/hooks/memory-optimizer.js +0 -510
  128. package/one/things/claude/hooks/ontology-compliance.js +0 -394
  129. package/one/things/claude/hooks/ontology-hook-manager.js +0 -316
  130. package/one/things/claude/hooks/ontology-validation-engine.js +0 -317
  131. package/one/things/claude/hooks/performance-monitoring-hook.js +0 -422
  132. package/one/things/claude/hooks/quality-scoring-engine.js +0 -834
  133. package/one/things/claude/hooks/simple-load-balancer.js +0 -238
  134. package/one/things/claude/hooks/startup-optimizer.js +0 -625
  135. package/one/things/claude/hooks/story-scoring-system.js +0 -445
  136. package/one/things/claude/hooks/story-validation-engine.js +0 -473
  137. package/one/things/claude/hooks/structure-synchronizer.js +0 -194
  138. package/one/things/claude/hooks/sub-agent-output-validator.js +0 -647
  139. package/one/things/claude/hooks/sub-agent-validation-hook.js +0 -343
  140. package/one/things/claude/hooks/trinity-validation-system.js +0 -392
  141. package/one/things/plans/organizations-to-groups.md +0 -705
@@ -0,0 +1,266 @@
1
+ # /one Command Onboarding Enhancement
2
+
3
+ **Date:** 2025-10-20
4
+ **File Modified:** `.claude/commands/one.md`
5
+ **Lines Added:** ~350 lines (original 214 → updated 564)
6
+
7
+ ---
8
+
9
+ ## Summary of Changes
10
+
11
+ Enhanced the `/one` command to support seamless onboarding flow for users coming from `npx oneie init`.
12
+
13
+ ### Key Features Added
14
+
15
+ 1. **Onboarding Detection** - Checks for `.onboarding.json` on every `/one` invocation
16
+ 2. **State-Based Flow** - Handles 4 states: pending_analysis, building, completed, normal
17
+ 3. **Agent Coordination** - Invokes agent-onboard and agent-director via Task tool
18
+ 4. **Progress Tracking** - Shows real-time progress during builds
19
+ 5. **Resumption Support** - Can resume interrupted onboarding flows
20
+ 6. **Backward Compatibility** - Normal /one behavior if no onboarding detected
21
+
22
+ ---
23
+
24
+ ## Changes in Detail
25
+
26
+ ### 1. Updated Initialization Checks (Lines 48-99)
27
+
28
+ **Added Step 1: Onboarding Check**
29
+
30
+ ```bash
31
+ find . -maxdepth 2 -name ".onboarding.json" -type f 2>/dev/null | head -1
32
+ ```
33
+
34
+ - Searches for `.onboarding.json` in installation folders
35
+ - Reads file and checks `status` field
36
+ - Routes to appropriate flow based on status:
37
+ - `"pending_analysis"` → Start onboarding flow
38
+ - `"building"` → Show progress summary
39
+ - `"completed"` → Show completion summary + normal menu
40
+ - Other/missing → Normal /one behavior
41
+
42
+ ### 2. Added Onboarding Flow Section (Lines 217-564)
43
+
44
+ **8 Steps for Complete Onboarding:**
45
+
46
+ #### Step 1: Display Welcome with Context
47
+ - Shows organization name, website URL, and status
48
+ - Friendly welcome message with user's name
49
+
50
+ #### Step 2: Invoke agent-onboard
51
+ - Uses Task tool (not direct function calls)
52
+ - Delegates website analysis to agent-onboard
53
+ - Passes website URL and organization slug
54
+
55
+ #### Step 3: Wait for Analysis
56
+ - Shows "Analyzing..." message
57
+ - Blocks until agent-onboard completes
58
+
59
+ #### Step 4: Present Recommended Features
60
+ - Reads updated `.onboarding.json`
61
+ - Displays extracted brand identity
62
+ - Shows custom ontology dimensions
63
+ - Lists recommended features in 3 categories:
64
+ - Foundation (always recommended)
65
+ - Detected from site
66
+ - AI & Automation (optional)
67
+
68
+ #### Step 5: Accept User Feature Selection
69
+ - Parses user input (comma-separated, "all foundation", "all")
70
+ - Extracts selected feature IDs
71
+
72
+ #### Step 6: Invoke agent-director
73
+ - Uses Task tool to delegate planning
74
+ - Passes selected features and custom ontology path
75
+ - agent-director creates 100-inference plan
76
+
77
+ #### Step 7: Show Plan Summary
78
+ - Displays total inferences and estimated duration
79
+ - Lists phases with specialist assignments
80
+ - Announces build start
81
+
82
+ #### Step 8: Update Status and Let Specialists Work
83
+ - Updates `.onboarding.json` status to "building"
84
+ - Trusts agent-director to coordinate specialists:
85
+ - agent-backend (backend features)
86
+ - agent-frontend (UI/UX)
87
+ - agent-integrator (external systems)
88
+ - agent-quality (validation)
89
+ - agent-designer (wireframes)
90
+ - agent-documenter (documentation)
91
+
92
+ ### 3. Added Progress Check (Lines 417-441)
93
+
94
+ When user runs `/one` during build:
95
+ - Shows current progress (X/Y inferences, Z% complete)
96
+ - Lists phase status with icons (✅ completed, 🔨 in progress, ⏳ pending)
97
+ - Displays completion timestamps and URLs
98
+ - Reminds user building continues in background
99
+
100
+ ### 4. Added Completion Summary (Lines 443-483)
101
+
102
+ When user runs `/one` after completion:
103
+ - Congratulates user
104
+ - Lists completed features with URLs
105
+ - Shows documentation locations
106
+ - Suggests next steps (/build, /design, /deploy, /see)
107
+ - Then continues to normal /one menu
108
+
109
+ ### 5. Added Critical Rules (Lines 487-497)
110
+
111
+ **8 Critical Rules for Onboarding:**
112
+
113
+ 1. ALWAYS check for `.onboarding.json` FIRST
114
+ 2. NEVER skip agent-onboard (website analysis is critical)
115
+ 3. ALWAYS use Task tool to invoke agents
116
+ 4. WAIT for agents to complete before proceeding
117
+ 5. UPDATE `.onboarding.json` after each major step
118
+ 6. SHOW PROGRESS to user (transparency)
119
+ 7. ENABLE RESUMPTION (can restart if interrupted)
120
+ 8. BACKWARD COMPATIBLE (normal /one if no onboarding)
121
+
122
+ ### 6. Added File Update Patterns (Lines 500-563)
123
+
124
+ Documents how to update `.onboarding.json` at each stage:
125
+
126
+ - **After agent-onboard:** Add brand, ontology, recommended features
127
+ - **After user selection:** Add selected feature IDs
128
+ - **After agent-director planning:** Add plan with phases and inferences
129
+ - **After completion:** Mark plan as completed with timestamp
130
+
131
+ ---
132
+
133
+ ## Integration Points
134
+
135
+ ### Works With
136
+
137
+ 1. **CLI (`npx oneie init`)** - Creates `.onboarding.json` with user info
138
+ 2. **agent-onboard** - Analyzes website, extracts brand, generates ontology
139
+ 3. **agent-director** - Creates 100-inference plan, coordinates specialists
140
+ 4. **Specialist agents** - Implement features (backend, frontend, integrator, etc.)
141
+ 5. **Installation folders** - Custom ontology and documentation stored here
142
+
143
+ ### File Dependencies
144
+
145
+ - **Input:** `.onboarding.json` (created by CLI)
146
+ - **Reads:** Installation folder structure, custom ontology
147
+ - **Updates:** `.onboarding.json` (status transitions)
148
+ - **Creates:** Progress tracking, feature documentation
149
+
150
+ ---
151
+
152
+ ## State Transitions
153
+
154
+ ```
155
+ pending_analysis
156
+ ↓ (after agent-onboard completes)
157
+ features_presented
158
+ ↓ (after user selects features)
159
+ plan_generated
160
+ ↓ (after agent-director creates plan)
161
+ building
162
+ ↓ (after all phases complete)
163
+ completed
164
+ ```
165
+
166
+ ---
167
+
168
+ ## User Experience Flow
169
+
170
+ ```
171
+ $ npx oneie init
172
+ → Collects name, org, website, email
173
+ → Creates /[org-slug]/ folder
174
+ → Generates .onboarding.json
175
+ → Launches Claude Code
176
+
177
+ $ /one (in Claude)
178
+ → Detects .onboarding.json (status: pending_analysis)
179
+ → Displays welcome with context
180
+ → Invokes agent-onboard
181
+ → Shows brand extraction results
182
+ → Presents recommended features
183
+ → User selects features
184
+ → Invokes agent-director
185
+ → Shows plan summary
186
+ → Starts build
187
+
188
+ $ /one (check progress)
189
+ → Detects .onboarding.json (status: building)
190
+ → Shows current progress (X/Y inferences)
191
+ → Lists phase status
192
+ → Building continues
193
+
194
+ $ /one (after completion)
195
+ → Detects .onboarding.json (status: completed)
196
+ → Shows completion summary
197
+ → Lists live URLs
198
+ → Continues to normal /one menu
199
+ ```
200
+
201
+ ---
202
+
203
+ ## Backward Compatibility
204
+
205
+ **No Breaking Changes:**
206
+
207
+ - If `.onboarding.json` doesn't exist → Normal /one behavior
208
+ - All existing functionality preserved
209
+ - New onboarding is opt-in (requires CLI to create file)
210
+ - Normal menu still accessible after onboarding completes
211
+
212
+ ---
213
+
214
+ ## Testing Checklist
215
+
216
+ To test this enhancement:
217
+
218
+ - [ ] Create mock `.onboarding.json` with status "pending_analysis"
219
+ - [ ] Run `/one` and verify onboarding flow triggers
220
+ - [ ] Verify agent-onboard is invoked via Task tool
221
+ - [ ] Check `.onboarding.json` updates after analysis
222
+ - [ ] Verify feature selection works (comma-separated input)
223
+ - [ ] Verify agent-director is invoked with correct params
224
+ - [ ] Test progress check (status: "building")
225
+ - [ ] Test completion summary (status: "completed")
226
+ - [ ] Test normal /one behavior (no .onboarding.json)
227
+ - [ ] Test resumption (interrupt and restart)
228
+
229
+ ---
230
+
231
+ ## Key Benefits
232
+
233
+ 1. **Seamless Handoff** - CLI → Claude coordination is smooth
234
+ 2. **Personalized** - Website analysis creates custom ontology
235
+ 3. **Transparent** - User sees progress at every step
236
+ 4. **Resumable** - Can check status and resume anytime
237
+ 5. **Automated** - Minimal user input, maximum automation
238
+ 6. **Backward Compatible** - Doesn't break existing /one usage
239
+
240
+ ---
241
+
242
+ ## Related Files
243
+
244
+ - **CLI Source:** `cli/src/commands/init.ts` (creates .onboarding.json)
245
+ - **Agent Specs:**
246
+ - `.claude/agents/agent-onboard.md` (website analysis)
247
+ - `.claude/agents/agent-director.md` (plan generation)
248
+ - **Documentation:**
249
+ - `one/knowledge/cli-claude-handoff.md` (handoff specification)
250
+ - `one/knowledge/installation-folders.md` (folder structure)
251
+
252
+ ---
253
+
254
+ ## Next Steps
255
+
256
+ 1. **Implement CLI side** - `npx oneie init` command
257
+ 2. **Test onboarding flow** - End-to-end with real website
258
+ 3. **Enhance agent-onboard** - Website analysis logic
259
+ 4. **Add feature library** - Predefined features for recommendations
260
+ 5. **Create analytics** - Track onboarding success rates
261
+
262
+ ---
263
+
264
+ **Status:** ✅ Implementation Complete
265
+
266
+ The `/one` command now supports full onboarding flow while maintaining 100% backward compatibility!
@@ -1,195 +1,122 @@
1
1
  ---
2
- allowed-tools: Bash(cd web && bun run build:*), Bash(cd web && wrangler pages deploy:*), Bash(echo:*), Bash(cat .env:*), Bash(grep CLOUDFLARE .env:*)
3
- description: Deploy your website to Cloudflare Pages with automated setup
2
+ allowed-tools: Bash(*), Read(*), Edit(*)
3
+ description: Deploy web to Cloudflare Pages
4
4
  ---
5
5
 
6
- # /deploy - Deploy to Cloudflare Pages
6
+ # /deploy - Deploy Web to Cloudflare Pages
7
7
 
8
- **Purpose:** Deploy your website to Cloudflare Pages with one command. This handles everything from checking credentials to building and deploying.
8
+ **Purpose:** Build and deploy the web application to Cloudflare Pages with zero-downtime deployment.
9
9
 
10
10
  ## How It Works
11
11
 
12
- This command will:
13
- 1. Check if you have Cloudflare credentials configured
14
- 2. If not, provide step-by-step instructions to get them
15
- 3. Build your website
16
- 4. Deploy to Cloudflare Pages
17
- 5. Give you the live URL
12
+ This command builds the Astro web application and deploys it to Cloudflare Pages using wrangler.
18
13
 
19
- ## Your Task
14
+ **Deployment Flow:**
15
+ 1. Navigate to web directory
16
+ 2. Build production bundle (with React 19 edge support)
17
+ 3. Deploy to Cloudflare Pages
18
+ 4. Report deployment URL and status
20
19
 
21
- Follow these steps in order:
22
-
23
- ### Step 1: Check for Cloudflare Credentials
24
-
25
- Run this command to check if credentials are configured:
20
+ ## Quick Deploy
26
21
 
27
22
  ```bash
28
- grep -E "CLOUDFLARE_GLOBAL_API_KEY|CLOUDFLARE_ACCOUNT_ID|CLOUDFLARE_EMAIL" .env 2>/dev/null || echo "No Cloudflare credentials found"
23
+ # Build and deploy in one command
24
+ cd web && bun run build && wrangler pages deploy dist --project-name=web --commit-dirty=true
29
25
  ```
30
26
 
31
- ### Step 2: If Credentials Are Missing
32
-
33
- If the user doesn't have credentials, provide these instructions:
27
+ ## Requirements
34
28
 
35
- **"To deploy to Cloudflare, you need to add three environment variables to your `.env` file. Here's how to get them:**
29
+ **Before deploying, ensure:**
30
+ - ✅ You're authenticated with wrangler: `wrangler login`
31
+ - ✅ React 19 edge alias is configured in `astro.config.mjs`
32
+ - ✅ Environment variables set in `wrangler.toml`
36
33
 
37
- **1. Get Your Cloudflare Global API Key:**
38
- - Go to https://dash.cloudflare.com/profile/api-tokens
39
- - Scroll to "API Keys" section
40
- - Click "View" next to "Global API Key"
41
- - Copy the key (you'll need to enter your Cloudflare password)
34
+ ## Deployment URLs
42
35
 
43
- **2. Get Your Account ID:**
44
- - Go to https://dash.cloudflare.com/
45
- - Select any website
46
- - On the right side, you'll see "Account ID" - copy it
36
+ **Production:**
37
+ - Primary: https://web.one.ie (custom domain)
38
+ - Cloudflare: https://web-d3d.pages.dev
47
39
 
48
- **3. Get Your Email:**
49
- - This is the email you use to log into Cloudflare
40
+ **Preview:**
41
+ - Auto-generated: https://[commit-hash].web-d3d.pages.dev
50
42
 
51
- **4. Add to Your `.env` File:**
43
+ ## Environment Configuration
52
44
 
53
- Open or create a `.env` file in your project root and add:
45
+ ### For ONE Platform (Default)
54
46
 
55
- ```bash
56
- CLOUDFLARE_GLOBAL_API_KEY=your-global-api-key-here
57
- CLOUDFLARE_ACCOUNT_ID=your-account-id-here
58
- CLOUDFLARE_EMAIL=your-cloudflare-email@example.com
47
+ ```toml
48
+ # wrangler.toml
49
+ ORG_NAME = "one"
50
+ ORG_WEBSITE = "https://one.ie"
51
+ ORG_FOLDER = "onegroup"
52
+ ONE_BACKEND = "on"
59
53
  ```
60
54
 
61
- **IMPORTANT SECURITY NOTES:**
62
- - The Global API Key provides **FULL CONTROL** over your Cloudflare account
63
- - Never commit your `.env` file to git (it should already be in `.gitignore`)
64
- - Never share these credentials with anyone
65
- - This gives complete access to create, modify, and delete resources
66
-
67
- Once you've added these to `.env`, run `/deploy` again to deploy your site!"
68
-
69
- ### Step 3: If Credentials Exist, Deploy
70
-
71
- If credentials are found, proceed with deployment:
72
-
73
- ```bash
74
- # 1. Build the website
75
- cd web
76
- echo "Building your website..."
77
- bun run build
55
+ **Result:** Full ONE Platform homepage
78
56
 
79
- # 2. Deploy to Cloudflare Pages
80
- echo ""
81
- echo "Deploying to Cloudflare Pages..."
82
- wrangler pages deploy dist --project-name=web --commit-dirty=true
57
+ ### For Customer Organizations
83
58
 
84
- # 3. The output will show the deployment URL
59
+ ```toml
60
+ # wrangler.toml (customer config)
61
+ ORG_NAME = "acme"
62
+ ORG_WEBSITE = "https://acme.com"
63
+ ORG_FOLDER = "acme"
64
+ ONE_BACKEND = "off" # Frontend-only
85
65
  ```
86
66
 
87
- ### Step 4: Report Success
88
-
89
- After deployment completes, tell the user:
90
-
91
- **"✅ Deployment Complete!**
92
-
93
- Your website is now live at:
94
- - **Production**: https://web.one.ie (if custom domain configured)
95
- - **Preview**: [URL from wrangler output]
96
-
97
- **What Just Happened:**
98
- 1. Built your website (optimized for production)
99
- 2. Uploaded to Cloudflare Pages
100
- 3. Deployed to edge servers worldwide (330+ locations)
101
-
102
- **Next Steps:**
103
- - Test your live site
104
- - Set up a custom domain (if desired)
105
- - Configure CI/CD for automatic deployments
106
-
107
- **Deployment Dashboard:**
108
- https://dash.cloudflare.com → Pages → web
109
-
110
- **To redeploy after changes:**
111
- Just run `/deploy` again anytime!"
112
-
113
- ## Error Handling
114
-
115
- ### If Build Fails
67
+ **Result:** Customer homepage with GetStartedPrompt
116
68
 
117
- Tell the user:
118
- "❌ Build failed. Please fix the errors above and try again.
69
+ ## React 19 + Cloudflare Edge Fix
119
70
 
120
- Common issues:
121
- - TypeScript errors: Run `bunx astro check`
122
- - Missing dependencies: Run `bun install`
123
- - Configuration issues: Check `astro.config.mjs`"
71
+ **Critical:** Ensure `astro.config.mjs` has:
124
72
 
125
- ### If Wrangler Not Authenticated
73
+ ```javascript
74
+ resolve: {
75
+ alias: {
76
+ 'react-dom/server': 'react-dom/server.edge',
77
+ },
78
+ }
79
+ ```
126
80
 
127
- If you see an error about wrangler authentication, tell the user:
81
+ Without this, deployment fails with `MessageChannel is not defined`.
128
82
 
129
- "You need to authenticate wrangler CLI:
83
+ ## Common Issues
130
84
 
85
+ **MessageChannel error:**
131
86
  ```bash
132
- npx wrangler login
87
+ # Fix: Add edge alias to astro.config.mjs
88
+ 'react-dom/server': 'react-dom/server.edge'
133
89
  ```
134
90
 
135
- This will open a browser to log into Cloudflare. Once logged in, run `/deploy` again."
136
-
137
- ### If Project Doesn't Exist
138
-
139
- If the project doesn't exist on Cloudflare Pages:
140
-
141
- "The 'web' project doesn't exist yet. Let's create it:
142
-
143
- 1. Go to https://dash.cloudflare.com → Pages
144
- 2. Click "Create a project"
145
- 3. Name it 'web'
146
- 4. Skip the git connection for now
147
- 5. Run `/deploy` again
148
-
149
- Or change the project name in the deploy command to match an existing project."
150
-
151
- ## Important Notes
152
-
153
- **Security:**
154
- - The `.env` file is excluded from git by default
155
- - Your Global API Key gives full control - keep it secure
156
- - Never log or display the actual key values
157
-
158
- **Deployment:**
159
- - First deployment may take 2-3 minutes
160
- - Subsequent deployments are faster (~30 seconds)
161
- - Changes are live on the edge network within seconds
162
-
163
- **Custom Domains:**
164
- - Add custom domains in Cloudflare Pages dashboard
165
- - HTTPS is automatic and free
166
- - DNS can be managed in Cloudflare
91
+ **Not authenticated:**
92
+ ```bash
93
+ wrangler login
94
+ ```
167
95
 
168
- ## Example Session
96
+ **Build errors:**
97
+ ```bash
98
+ cd web && bunx astro check
99
+ ```
169
100
 
170
- **User runs `/deploy` without credentials:**
101
+ ## Customer Deployment
171
102
 
172
- ```
173
- ❌ No Cloudflare credentials found in .env
103
+ For customers deploying their own sites:
174
104
 
175
- To deploy, you need three values from Cloudflare:
176
- [...instructions above...]
177
- ```
105
+ ```bash
106
+ # 1. Install CLI
107
+ npx oneie
178
108
 
179
- **User adds credentials and runs `/deploy` again:**
109
+ # 2. Configure (edit web/.env.local)
110
+ ORG_NAME=acme
111
+ ORG_WEBSITE=https://acme.com
112
+ ONE_BACKEND=off
180
113
 
181
- ```
182
- ✅ Cloudflare credentials found
183
- 🔨 Building website...
184
- ✓ Build complete (2.3s)
185
- 🚀 Deploying to Cloudflare Pages...
186
- ✨ Upload complete
187
- 🌍 Deploying globally...
188
- ✅ Deployment complete!
189
-
190
- Your site is live at: https://abc123.pages.dev
114
+ # 3. Deploy
115
+ cd web
116
+ bun run build
117
+ wrangler pages deploy dist --project-name=acme-web
191
118
  ```
192
119
 
193
120
  ---
194
121
 
195
- **Simple, secure, and powerful deployment in one command! 🚀**
122
+ **Deployment ready** 🚀