oneie 3.3.5 → 3.4.0

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.
@@ -0,0 +1,195 @@
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
4
+ ---
5
+
6
+ # /deploy - Deploy to Cloudflare Pages
7
+
8
+ **Purpose:** Deploy your website to Cloudflare Pages with one command. This handles everything from checking credentials to building and deploying.
9
+
10
+ ## How It Works
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
18
+
19
+ ## Your Task
20
+
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:
26
+
27
+ ```bash
28
+ grep -E "CLOUDFLARE_GLOBAL_API_KEY|CLOUDFLARE_ACCOUNT_ID|CLOUDFLARE_EMAIL" .env 2>/dev/null || echo "No Cloudflare credentials found"
29
+ ```
30
+
31
+ ### Step 2: If Credentials Are Missing
32
+
33
+ If the user doesn't have credentials, provide these instructions:
34
+
35
+ **"To deploy to Cloudflare, you need to add three environment variables to your `.env` file. Here's how to get them:**
36
+
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)
42
+
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
47
+
48
+ **3. Get Your Email:**
49
+ - This is the email you use to log into Cloudflare
50
+
51
+ **4. Add to Your `.env` File:**
52
+
53
+ Open or create a `.env` file in your project root and add:
54
+
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
59
+ ```
60
+
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
78
+
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
83
+
84
+ # 3. The output will show the deployment URL
85
+ ```
86
+
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
116
+
117
+ Tell the user:
118
+ "❌ Build failed. Please fix the errors above and try again.
119
+
120
+ Common issues:
121
+ - TypeScript errors: Run `bunx astro check`
122
+ - Missing dependencies: Run `bun install`
123
+ - Configuration issues: Check `astro.config.mjs`"
124
+
125
+ ### If Wrangler Not Authenticated
126
+
127
+ If you see an error about wrangler authentication, tell the user:
128
+
129
+ "You need to authenticate wrangler CLI:
130
+
131
+ ```bash
132
+ npx wrangler login
133
+ ```
134
+
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
167
+
168
+ ## Example Session
169
+
170
+ **User runs `/deploy` without credentials:**
171
+
172
+ ```
173
+ ❌ No Cloudflare credentials found in .env
174
+
175
+ To deploy, you need three values from Cloudflare:
176
+ [...instructions above...]
177
+ ```
178
+
179
+ **User adds credentials and runs `/deploy` again:**
180
+
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
191
+ ```
192
+
193
+ ---
194
+
195
+ **Simple, secure, and powerful deployment in one command! 🚀**
@@ -0,0 +1,432 @@
1
+ # /push - Smart Multi-Repository Push
2
+
3
+ **Purpose:** Intelligently commit and push changes to all ONE Platform repositories with contextual commit messages.
4
+
5
+ ## How It Works
6
+
7
+ This command analyzes changes across the monorepo and pushes to the appropriate repositories:
8
+ - `/web` → `github.com/one-ie/web`
9
+ - `/cli` → `github.com/one-ie/cli`
10
+ - `/one` → `github.com/one-ie/one-ontology`
11
+ - `/apps/one` → `github.com/one-ie/one` (assembly repository)
12
+
13
+ ## Your Task
14
+
15
+ When the user runs `/push`, you MUST:
16
+
17
+ ### Step 1: Analyze Changes
18
+
19
+ Run git status in each directory to understand what changed:
20
+
21
+ ```bash
22
+ # Check web changes
23
+ cd web && git status --short
24
+
25
+ # Check cli changes
26
+ cd cli && git status --short
27
+
28
+ # Check ontology changes
29
+ cd one && git status --short
30
+
31
+ # Check one assembly changes
32
+ cd apps/one && git status --short
33
+ ```
34
+
35
+ ### Step 2: Generate Contextual Commit Messages
36
+
37
+ Based on the changes detected, create commit messages following this structure:
38
+
39
+ **Format:**
40
+ ```
41
+ <type>: <short description>
42
+
43
+ <detailed explanation>
44
+
45
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
46
+
47
+ Co-Authored-By: Claude <noreply@anthropic.com>
48
+ ```
49
+
50
+ **Types:**
51
+ - `feat:` - New features or capabilities
52
+ - `fix:` - Bug fixes
53
+ - `docs:` - Documentation updates
54
+ - `style:` - UI/styling changes
55
+ - `refactor:` - Code refactoring without functional changes
56
+ - `test:` - Test additions or updates
57
+ - `chore:` - Maintenance tasks (dependency updates, config changes)
58
+ - `perf:` - Performance improvements
59
+ - `ci:` - CI/CD pipeline changes
60
+
61
+ ### Step 3: Push to Each Repository
62
+
63
+ For each repository with changes:
64
+
65
+ **Web Repository:**
66
+ ```bash
67
+ cd web
68
+ git add .
69
+ git commit -m "$(cat <<'EOF'
70
+ <type>: <description>
71
+
72
+ <detailed explanation of web-specific changes>
73
+
74
+ Changes:
75
+ - Updated component X with Y
76
+ - Fixed Z issue in page A
77
+ - Added new feature B
78
+
79
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
80
+
81
+ Co-Authored-By: Claude <noreply@anthropic.com>
82
+ EOF
83
+ )"
84
+ git push origin main
85
+ ```
86
+
87
+ **CLI Repository:**
88
+ ```bash
89
+ cd cli
90
+ git add .
91
+ git commit -m "$(cat <<'EOF'
92
+ <type>: <description>
93
+
94
+ <detailed explanation of CLI-specific changes>
95
+
96
+ Changes:
97
+ - Enhanced command X
98
+ - Fixed Y issue in Z
99
+ - Updated documentation
100
+
101
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
102
+
103
+ Co-Authored-By: Claude <noreply@anthropic.com>
104
+ EOF
105
+ )"
106
+ git push origin main
107
+ ```
108
+
109
+ **ONE Ontology Repository:**
110
+ ```bash
111
+ cd one
112
+ git add .
113
+ git commit -m "$(cat <<'EOF'
114
+ <type>: <description>
115
+
116
+ <detailed explanation of ontology documentation changes>
117
+
118
+ Changes:
119
+ - Updated dimension X documentation
120
+ - Added new ontology specification Y
121
+ - Enhanced knowledge base Z
122
+
123
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
124
+
125
+ Co-Authored-By: Claude <noreply@anthropic.com>
126
+ EOF
127
+ )"
128
+ git push origin main
129
+ ```
130
+
131
+ **One Assembly Repository:**
132
+ ```bash
133
+ cd apps/one
134
+ git add .
135
+ git commit -m "$(cat <<'EOF'
136
+ <type>: <description>
137
+
138
+ <detailed explanation of assembly changes>
139
+
140
+ Synced:
141
+ - Ontology documentation updates
142
+ - Web subtree changes
143
+ - CLI synchronization
144
+
145
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
146
+
147
+ Co-Authored-By: Claude <noreply@anthropic.com>
148
+ EOF
149
+ )"
150
+ git push origin main
151
+ ```
152
+
153
+ ### Step 4: Smart Message Generation
154
+
155
+ Analyze the actual file changes to craft meaningful messages:
156
+
157
+ **Example Analysis:**
158
+ ```bash
159
+ # For web changes
160
+ git diff --stat web/
161
+
162
+ # Look for patterns:
163
+ # - src/pages/*.astro → "page updates"
164
+ # - src/components/*.tsx → "component changes"
165
+ # - src/styles/*.css → "styling updates"
166
+ # - package.json → "dependency updates"
167
+ ```
168
+
169
+ **Example Smart Messages:**
170
+
171
+ ```
172
+ feat: add hierarchical group navigation to ontology page
173
+
174
+ Enhanced the ontology page with multi-level group visualization:
175
+ - Added parent-child group relationship display
176
+ - Implemented breadcrumb navigation for nested groups
177
+ - Created GroupHierarchy component with collapse/expand
178
+ - Updated styles for visual depth indicators
179
+
180
+ Technical Details:
181
+ - Uses recursive rendering for unlimited nesting
182
+ - Optimized for performance with React.memo
183
+ - Added accessibility support (ARIA labels)
184
+
185
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
186
+
187
+ Co-Authored-By: Claude <noreply@anthropic.com>
188
+ ```
189
+
190
+ ```
191
+ fix: resolve TypeScript errors in CLI init command
192
+
193
+ Fixed type errors preventing successful CLI builds:
194
+ - Added missing type annotations in init.ts:45
195
+ - Corrected InstallationConfig interface
196
+ - Fixed async/await usage in file creation
197
+ - Updated test mocks with proper types
198
+
199
+ Errors Resolved:
200
+ - TS2345: Argument type mismatch (3 instances)
201
+ - TS2322: Type assignment error (1 instance)
202
+ - TS7006: Implicit any parameter (2 instances)
203
+
204
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
205
+
206
+ Co-Authored-By: Claude <noreply@anthropic.com>
207
+ ```
208
+
209
+ ```
210
+ docs: update installation folder documentation
211
+
212
+ Comprehensive documentation updates for installation folders:
213
+ - Added architecture diagrams to CLAUDE.md
214
+ - Documented file resolution priority
215
+ - Created examples in README.md
216
+ - Updated CLI command reference
217
+
218
+ Files Updated:
219
+ - CLAUDE.md: Added "Installation Folders" section
220
+ - README.md: Added quick start guide
221
+ - cli/README.md: Documented init command
222
+ - one/knowledge/installation-folders.md: Full specification
223
+
224
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
225
+
226
+ Co-Authored-By: Claude <noreply@anthropic.com>
227
+ ```
228
+
229
+ ### Step 5: Report Summary
230
+
231
+ After pushing, provide a clear summary:
232
+
233
+ ```
234
+ ✅ Multi-Repository Push Complete!
235
+
236
+ 📦 Repositories Updated:
237
+ - web: feat: add hierarchical group navigation
238
+ → https://github.com/one-ie/web/commit/<hash>
239
+
240
+ - cli: fix: resolve TypeScript errors in init command
241
+ → https://github.com/one-ie/cli/commit/<hash>
242
+
243
+ - one: docs: update 6-dimension ontology specification
244
+ → https://github.com/one-ie/one-ontology/commit/<hash>
245
+
246
+ - apps/one: chore: sync assembly repository
247
+ → https://github.com/one-ie/one/commit/<hash>
248
+
249
+ 🔗 Total commits: 4
250
+ ⏱️ Time: ~30 seconds
251
+
252
+ Next Steps:
253
+ - Monitor CI/CD pipelines
254
+ - Review commit history on GitHub
255
+ - Check for any failed workflows
256
+ ```
257
+
258
+ ## Advanced Features
259
+
260
+ ### Selective Push
261
+
262
+ If only one repository has changes, only push that one:
263
+
264
+ ```bash
265
+ # User: /push web
266
+ # → Only push web repository
267
+
268
+ # User: /push cli one
269
+ # → Push both cli and one repositories
270
+ ```
271
+
272
+ ### Dry Run Mode
273
+
274
+ ```bash
275
+ # User: /push --dry-run
276
+ # → Show what would be committed/pushed without actually doing it
277
+ ```
278
+
279
+ ### Interactive Mode
280
+
281
+ ```bash
282
+ # User: /push --interactive
283
+ # → Review each commit message before pushing
284
+ ```
285
+
286
+ ## Important Guidelines
287
+
288
+ **DO:**
289
+ - ✅ Analyze actual file changes before writing messages
290
+ - ✅ Use conventional commit format
291
+ - ✅ Include specific details (file names, functions, issues)
292
+ - ✅ Group related changes logically
293
+ - ✅ Check git status before committing
294
+ - ✅ Verify push succeeded
295
+
296
+ **DON'T:**
297
+ - ❌ Use generic messages like "update files"
298
+ - ❌ Commit without reviewing changes first
299
+ - ❌ Push without verifying branch is correct
300
+ - ❌ Skip the signature footer
301
+ - ❌ Ignore git status warnings
302
+
303
+ ## Error Handling
304
+
305
+ ### If repository has no changes:
306
+ ```
307
+ ℹ️ web: No changes to commit (working tree clean)
308
+ ```
309
+
310
+ ### If push fails:
311
+ ```
312
+ ❌ cli: Push failed
313
+ Reason: rejected (non-fast-forward)
314
+
315
+ Suggested action:
316
+ - Pull latest changes: cd cli && git pull
317
+ - Resolve conflicts if any
318
+ - Retry push
319
+ ```
320
+
321
+ ### If uncommitted changes exist:
322
+ ```
323
+ ⚠️ one: Uncommitted changes detected
324
+
325
+ Modified files:
326
+ - one/knowledge/ontology.md
327
+ - CLAUDE.md
328
+
329
+ Action: Will commit these changes before pushing
330
+ ```
331
+
332
+ ## Pre-Commit Hooks
333
+
334
+ If pre-commit hooks are configured, respect them:
335
+
336
+ ```bash
337
+ # If hook fails
338
+ ⚠️ Pre-commit hook failed in web/
339
+
340
+ Issues found:
341
+ - Linting errors in src/pages/ontology.astro
342
+ - Type errors in src/components/GroupHierarchy.tsx
343
+
344
+ Fix these issues before pushing? [y/N]
345
+ ```
346
+
347
+ ## Examples
348
+
349
+ **Example 1: Push all repositories**
350
+ ```
351
+ User: /push
352
+
353
+ Analyzing changes...
354
+ ✓ web: 5 files modified
355
+ ✓ cli: 2 files modified
356
+ ✓ one: 3 files modified
357
+ ✓ apps/one: 12 files modified
358
+
359
+ Generating commit messages...
360
+ Pushing to GitHub...
361
+
362
+ ✅ Complete! 4 repositories updated.
363
+ ```
364
+
365
+ **Example 2: Push specific repository**
366
+ ```
367
+ User: /push cli
368
+
369
+ Analyzing changes...
370
+ ✓ cli: 2 files modified
371
+
372
+ Commit message:
373
+ feat: add --verbose flag to init command
374
+
375
+ Allows users to see detailed output during initialization...
376
+
377
+ Push to one-ie/cli? [Y/n] y
378
+
379
+ ✅ Pushed to github.com/one-ie/cli
380
+ ```
381
+
382
+ **Example 3: Dry run**
383
+ ```
384
+ User: /push --dry-run
385
+
386
+ Would commit and push:
387
+
388
+ 📦 web (5 files):
389
+ - src/pages/ontology.astro
390
+ - src/components/GroupHierarchy.tsx
391
+ - src/styles/groups.css
392
+ Message: "feat: add hierarchical group navigation"
393
+
394
+ 📦 cli (2 files):
395
+ - src/commands/init.ts
396
+ - test/commands/init.test.ts
397
+ Message: "fix: resolve TypeScript errors in init command"
398
+
399
+ 📦 one (3 files):
400
+ - connections/ontology.md
401
+ - knowledge/architecture.md
402
+ - things/specifications/groups.md
403
+ Message: "docs: update 6-dimension ontology specification"
404
+
405
+ 📦 apps/one (12 files):
406
+ - Synced from root repositories
407
+ Message: "chore: sync assembly repository with latest changes"
408
+
409
+ 🔍 Dry run mode - nothing was actually pushed
410
+ ```
411
+
412
+ ## Security Considerations
413
+
414
+ - **Never commit secrets** (API keys, tokens, passwords)
415
+ - **Check .env files** are gitignored
416
+ - **Verify branch** before pushing (should be main or feature branch)
417
+ - **Review sensitive data** in commit diffs
418
+
419
+ ## Integration with /release
420
+
421
+ The `/push` command is complementary to `/release`:
422
+ - Use `/push` for regular development commits
423
+ - Use `/release` for versioned releases with deployment
424
+
425
+ ```
426
+ Development workflow:
427
+ /push → /push → /push → /release patch → /push
428
+ ```
429
+
430
+ ---
431
+
432
+ **Smart commits across all repositories with one command! 🚀**