oneie 3.6.24 → 3.6.26

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 (73) hide show
  1. package/.claude/agents/agent-backend.md +2 -2
  2. package/.claude/agents/agent-builder.md +226 -198
  3. package/.claude/agents/agent-designer.md +167 -11
  4. package/.claude/agents/agent-director.md +180 -112
  5. package/.claude/agents/agent-frontend.md +154 -8
  6. package/.claude/agents/agent-onboard.md +1 -1
  7. package/.claude/agents/agent-ontology.md +2 -2
  8. package/.claude/agents/agent-ops.md +58 -38
  9. package/.claude/agents/agent-quality.md +377 -0
  10. package/.claude/agents/agent-sales.md +3 -3
  11. package/.claude/commands/cascade.md +21 -21
  12. package/.claude/commands/create.md +19 -19
  13. package/.claude/commands/deploy.md +82 -104
  14. package/.claude/commands/mcp-on.md +191 -0
  15. package/.claude/commands/one.md +267 -92
  16. package/.claude/commands/plan.md +17 -17
  17. package/.claude/commands/release.md +65 -14
  18. package/.claude/hooks/PULL-BEFORE-PUSH-GUIDE.md +473 -0
  19. package/.claude/hooks/README-knowledge-hooks.md +451 -0
  20. package/.claude/hooks/README-root-cleanup.md +200 -0
  21. package/.claude/hooks/README.md +284 -0
  22. package/.claude/hooks/__pycache__/done.cpython-313.pyc +0 -0
  23. package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
  24. package/.claude/hooks/check-filenames.py +177 -0
  25. package/.claude/hooks/clean-post.py +468 -0
  26. package/.claude/hooks/clean-pre.py +393 -0
  27. package/.claude/hooks/clean-root-markdown.sh +73 -0
  28. package/.claude/hooks/commit-push.sh +95 -0
  29. package/.claude/hooks/done.py +236 -0
  30. package/.claude/hooks/format-hook.sh +163 -0
  31. package/.claude/hooks/hook-logger.sh +173 -0
  32. package/.claude/hooks/knowledge-post.py +355 -0
  33. package/.claude/hooks/knowledge-pre.py +245 -0
  34. package/.claude/hooks/mcp-on.sh +134 -0
  35. package/.claude/hooks/notification-hook.sh +279 -0
  36. package/.claude/hooks/push.sh +101 -0
  37. package/.claude/hooks/release-cli.sh +16 -8
  38. package/.claude/hooks/root-cleanup.py +217 -0
  39. package/.claude/hooks/security-hook.sh +397 -0
  40. package/.claude/hooks/tag-all-docs.py +464 -0
  41. package/.claude/hooks/test-validate-ontology.sh +170 -0
  42. package/.claude/hooks/todo.py +368 -0
  43. package/.claude/hooks/track-changes.sh +101 -0
  44. package/.claude/hooks/validate-ontology-structure-summary.md +243 -0
  45. package/.claude/hooks/validate-ontology-structure.py +518 -0
  46. package/.claude/skills/INDEX.md +1 -1
  47. package/.claude/skills/ontology/README.md +1 -1
  48. package/CLAUDE.md +105 -0
  49. package/dist/commands/agent.d.ts +18 -0
  50. package/dist/commands/agent.d.ts.map +1 -0
  51. package/dist/commands/agent.js +271 -0
  52. package/dist/commands/agent.js.map +1 -0
  53. package/dist/commands/init.js +1 -1
  54. package/dist/commands/init.js.map +1 -1
  55. package/dist/index.js +20 -0
  56. package/dist/index.js.map +1 -1
  57. package/dist/lib/agent-detection.d.ts +19 -0
  58. package/dist/lib/agent-detection.d.ts.map +1 -0
  59. package/dist/lib/agent-detection.js +87 -0
  60. package/dist/lib/agent-detection.js.map +1 -0
  61. package/dist/lib/detect.d.ts +45 -0
  62. package/dist/lib/detect.d.ts.map +1 -0
  63. package/dist/lib/detect.js +221 -0
  64. package/dist/lib/detect.js.map +1 -0
  65. package/llms.txt +257 -0
  66. package/one/knowledge/games-english.md +691 -0
  67. package/one/knowledge/games.md +1082 -0
  68. package/one/things/plans/npx-agent-safety.md +785 -0
  69. package/one/things/plans/npx-agent.md +1089 -0
  70. package/one/things/plans/remove-backend-development-from-agents.md +1331 -0
  71. package/package.json +3 -2
  72. package/.claude/commands/mcp-toggle.md +0 -93
  73. package/.claude/commands/npx.md +0 -84
@@ -0,0 +1,134 @@
1
+ #!/bin/bash
2
+
3
+ # MCP Server Toggle Script
4
+ # Enables/disables MCP (Model Context Protocol) servers for Claude Code
5
+ # Usage: ./mcp-on.sh [on|off|status]
6
+
7
+ set -e
8
+
9
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
10
+ MCP_CONFIG="$SCRIPT_DIR/.mcp.json"
11
+ MCP_CONFIG_OFF="$SCRIPT_DIR/.mcp.json.off"
12
+ MCP_CONFIG_ON="$SCRIPT_DIR/.mcp.json.on"
13
+
14
+ # Colors
15
+ GREEN='\033[0;32m'
16
+ RED='\033[0;31m'
17
+ YELLOW='\033[1;33m'
18
+ BLUE='\033[0;34m'
19
+ NC='\033[0m' # No Color
20
+
21
+ # Function to show status
22
+ show_status() {
23
+ if [ -f "$MCP_CONFIG" ]; then
24
+ echo -e "${GREEN}✓ MCPs are ON${NC}"
25
+ echo ""
26
+ echo "Active MCP Servers:"
27
+ grep '"[a-z-]*":\s*{' "$MCP_CONFIG" | grep -v "env\|args\|command\|notes\|disabled" | sed 's/.*"\([^"]*\)".*/\1/' | sort -u | sed 's/^/ • /'
28
+ echo ""
29
+ echo "Token usage: ~15k (full MCPs enabled)"
30
+ elif [ -f "$MCP_CONFIG_OFF" ]; then
31
+ echo -e "${YELLOW}⊘ MCPs are OFF${NC}"
32
+ echo ""
33
+ echo "Available MCP Servers (disabled):"
34
+ grep '"[a-z-]*":\s*{' "$MCP_CONFIG_OFF" | grep -v "env\|args\|command\|notes\|disabled" | sed 's/.*"\([^"]*\)".*/\1/' | sort -u | sed 's/^/ • /'
35
+ echo ""
36
+ echo "Token savings: ~10k (MCPs disabled)"
37
+ echo "Use './mcp-on.sh on' to enable"
38
+ else
39
+ echo -e "${RED}✗ No MCP configuration found${NC}"
40
+ fi
41
+ }
42
+
43
+ # Function to turn on MCPs
44
+ turn_on() {
45
+ if [ -f "$MCP_CONFIG" ]; then
46
+ echo -e "${YELLOW}MCPs are already ON${NC}"
47
+ return 0
48
+ fi
49
+
50
+ if [ ! -f "$MCP_CONFIG_OFF" ]; then
51
+ echo -e "${RED}Error: .mcp.json.off not found${NC}"
52
+ exit 1
53
+ fi
54
+
55
+ # Backup current state if .mcp.json exists
56
+ if [ -f "$MCP_CONFIG" ]; then
57
+ cp "$MCP_CONFIG" "$MCP_CONFIG_ON"
58
+ echo -e "${BLUE}Backed up current config to .mcp.json.on${NC}"
59
+ fi
60
+
61
+ # Enable MCPs by renaming .mcp.json.off to .mcp.json
62
+ cp "$MCP_CONFIG_OFF" "$MCP_CONFIG"
63
+
64
+ # Enable all MCPs by removing "disabled": true
65
+ sed -i '' 's/"disabled": true,/"disabled": false,/g' "$MCP_CONFIG"
66
+
67
+ echo -e "${GREEN}✓ MCPs turned ON${NC}"
68
+ echo ""
69
+ echo "Changes:"
70
+ echo " • Enabled: shadcn, cloudflare-builds, cloudflare-observability"
71
+ echo " • Enabled: cloudflare-docs, chrome-devtools, figma, astro-docs, stripe"
72
+ echo ""
73
+ echo -e "${YELLOW}Action Required:${NC} Restart Claude Code to activate"
74
+ echo ""
75
+ echo "MCP Servers now available:"
76
+ show_status | tail -n +3
77
+ }
78
+
79
+ # Function to turn off MCPs
80
+ turn_off() {
81
+ if [ -f "$MCP_CONFIG_OFF" ] && [ ! -f "$MCP_CONFIG" ]; then
82
+ echo -e "${YELLOW}MCPs are already OFF${NC}"
83
+ return 0
84
+ fi
85
+
86
+ if [ ! -f "$MCP_CONFIG" ]; then
87
+ echo -e "${RED}Error: .mcp.json not found${NC}"
88
+ exit 1
89
+ fi
90
+
91
+ # Backup current state
92
+ cp "$MCP_CONFIG" "$MCP_CONFIG_ON"
93
+
94
+ # Remove .mcp.json to disable MCPs
95
+ rm "$MCP_CONFIG"
96
+
97
+ echo -e "${GREEN}✓ MCPs turned OFF${NC}"
98
+ echo ""
99
+ echo "Changes:"
100
+ echo " • Disabled all MCP servers"
101
+ echo " • Freed ~10k context tokens"
102
+ echo ""
103
+ echo -e "${YELLOW}Action Required:${NC} Restart Claude Code to apply"
104
+ echo ""
105
+ echo "Previous config saved to: .mcp.json.on"
106
+ echo "To restore: ./mcp-on.sh on"
107
+ }
108
+
109
+ # Main logic
110
+ case "${1:-status}" in
111
+ on)
112
+ turn_on
113
+ ;;
114
+ off)
115
+ turn_off
116
+ ;;
117
+ status)
118
+ show_status
119
+ ;;
120
+ *)
121
+ echo "Usage: $0 {on|off|status}"
122
+ echo ""
123
+ echo "Commands:"
124
+ echo " on - Enable all MCP servers"
125
+ echo " off - Disable all MCP servers (saves ~10k tokens)"
126
+ echo " status - Show current MCP status"
127
+ echo ""
128
+ echo "Examples:"
129
+ echo " $0 on # Turn MCPs on"
130
+ echo " $0 off # Turn MCPs off (token saver)"
131
+ echo " $0 status # Check current status"
132
+ exit 1
133
+ ;;
134
+ esac
@@ -0,0 +1,279 @@
1
+ #!/bin/bash
2
+
3
+ # Notification Hook - ONE Platform
4
+ # Sends development notifications via console, system, or file
5
+ # Aligned with 6-dimension ontology
6
+ #
7
+ # DIMENSION MAPPING (by cycle range):
8
+ # Cycle 1-10: 🏗️ Foundation & Setup
9
+ # Cycle 11-20: 📦 Backend Schema (things)
10
+ # Cycle 21-30: 🎨 Frontend UI (things)
11
+ # Cycle 31-40: 🔗 Integration (connections)
12
+ # Cycle 41-50: 👤 Auth & Authorization (people)
13
+ # Cycle 51-60: 🧠 Knowledge & RAG (knowledge)
14
+ # Cycle 61-70: ✅ Quality & Testing (events)
15
+ # Cycle 71-80: 🎭 Design & Wireframes (things)
16
+ # Cycle 81-90: ⚡ Performance (events)
17
+ # Cycle 91-100: 🚀 Deployment (groups)
18
+ #
19
+ # ONTOLOGY DIMENSIONS:
20
+ # - groups: Multi-tenant containers (friend circles → governments)
21
+ # - people: Authorization & governance (4 roles)
22
+ # - things: All entities (66+ types)
23
+ # - connections: All relationships (25+ types)
24
+ # - events: All actions & state changes (67+ types)
25
+ # - knowledge: Labels, embeddings, RAG
26
+
27
+ set -e
28
+
29
+ # Source the logger
30
+ source "$CLAUDE_PROJECT_DIR/.claude/hooks/hook-logger.sh"
31
+
32
+ # Configuration
33
+ EVENT="${1:-}"
34
+ MESSAGE="${2:-}"
35
+ TYPE="${3:-info}" # info, success, warning, error
36
+ CHANNEL="${4:-console}" # console, system, file, all
37
+
38
+ # Log start
39
+ log_message "INFO" "notification-hook: $EVENT ($TYPE) via $CHANNEL"
40
+ START_TIME=$(get_time_ms)
41
+
42
+ # Load cycle context if available
43
+ CYCLEENCE_STATE="$CLAUDE_PROJECT_DIR/.claude/state/cycle.json"
44
+ CURRENT_CYCLE="Unknown"
45
+ FEATURE_NAME="Unknown Feature"
46
+ ORGANIZATION="Unknown Org"
47
+
48
+ if [ -f "$CYCLEENCE_STATE" ]; then
49
+ if command -v jq &> /dev/null; then
50
+ CURRENT_CYCLE=$(jq -r '.current_cycle // "Unknown"' "$CYCLEENCE_STATE" 2>/dev/null || echo "Unknown")
51
+ FEATURE_NAME=$(jq -r '.feature_name // "Unknown Feature"' "$CYCLEENCE_STATE" 2>/dev/null || echo "Unknown Feature")
52
+ ORGANIZATION=$(jq -r '.organization // "Unknown Org"' "$CYCLEENCE_STATE" 2>/dev/null || echo "Unknown Org")
53
+ fi
54
+ fi
55
+
56
+ # Map cycle to dimension and emoji
57
+ get_dimension_info() {
58
+ local cycle=$1
59
+ local dimension=""
60
+ local emoji=""
61
+ local phase=""
62
+
63
+ if [ "$cycle" = "Unknown" ]; then
64
+ echo "❓|unknown|General"
65
+ return
66
+ fi
67
+
68
+ # Map cycle ranges to 6-dimension ontology
69
+ if [ "$cycle" -ge 1 ] && [ "$cycle" -le 10 ]; then
70
+ dimension="foundation"
71
+ emoji="🏗️"
72
+ phase="Foundation & Setup"
73
+ elif [ "$cycle" -ge 11 ] && [ "$cycle" -le 20 ]; then
74
+ dimension="things"
75
+ emoji="📦"
76
+ phase="Backend Schema (things)"
77
+ elif [ "$cycle" -ge 21 ] && [ "$cycle" -le 30 ]; then
78
+ dimension="things"
79
+ emoji="🎨"
80
+ phase="Frontend UI (things)"
81
+ elif [ "$cycle" -ge 31 ] && [ "$cycle" -le 40 ]; then
82
+ dimension="connections"
83
+ emoji="🔗"
84
+ phase="Integration (connections)"
85
+ elif [ "$cycle" -ge 41 ] && [ "$cycle" -le 50 ]; then
86
+ dimension="people"
87
+ emoji="👤"
88
+ phase="Auth & Authorization (people)"
89
+ elif [ "$cycle" -ge 51 ] && [ "$cycle" -le 60 ]; then
90
+ dimension="knowledge"
91
+ emoji="🧠"
92
+ phase="Knowledge & RAG"
93
+ elif [ "$cycle" -ge 61 ] && [ "$cycle" -le 70 ]; then
94
+ dimension="events"
95
+ emoji="✅"
96
+ phase="Quality & Testing (events)"
97
+ elif [ "$cycle" -ge 71 ] && [ "$cycle" -le 80 ]; then
98
+ dimension="things"
99
+ emoji="🎭"
100
+ phase="Design & Wireframes (things)"
101
+ elif [ "$cycle" -ge 81 ] && [ "$cycle" -le 90 ]; then
102
+ dimension="events"
103
+ emoji="⚡"
104
+ phase="Performance (events)"
105
+ elif [ "$cycle" -ge 91 ] && [ "$cycle" -le 100 ]; then
106
+ dimension="groups"
107
+ emoji="🚀"
108
+ phase="Deployment (groups)"
109
+ else
110
+ dimension="unknown"
111
+ emoji="❓"
112
+ phase="Unknown Phase"
113
+ fi
114
+
115
+ echo "$emoji|$dimension|$phase"
116
+ }
117
+
118
+ # Console notification with ontology context
119
+ send_console() {
120
+ local msg="$1"
121
+ local type="$2"
122
+
123
+ # Get dimension info
124
+ local dim_info=$(get_dimension_info "$CURRENT_CYCLE")
125
+ local dim_emoji=$(echo "$dim_info" | cut -d'|' -f1)
126
+ local dimension=$(echo "$dim_info" | cut -d'|' -f2)
127
+ local phase=$(echo "$dim_info" | cut -d'|' -f3)
128
+
129
+ # Build context line
130
+ local context="[Cycle $CURRENT_CYCLE] $dim_emoji $phase"
131
+
132
+ case "$type" in
133
+ "success") echo "✅ $msg" ;;
134
+ "warning") echo "⚠️ $msg" ;;
135
+ "error") echo "❌ $msg" ;;
136
+ *) echo "ℹ️ $msg" ;;
137
+ esac
138
+
139
+ # Show ontology context
140
+ echo " $context | 🏢 $ORGANIZATION | 🎯 $FEATURE_NAME"
141
+ }
142
+
143
+ # System notification (macOS/Linux) with ontology context
144
+ send_system() {
145
+ local title="$1"
146
+ local msg="$2"
147
+
148
+ # Get dimension info
149
+ local dim_info=$(get_dimension_info "$CURRENT_CYCLE")
150
+ local dim_emoji=$(echo "$dim_info" | cut -d'|' -f1)
151
+ local dimension=$(echo "$dim_info" | cut -d'|' -f2)
152
+ local phase=$(echo "$dim_info" | cut -d'|' -f3)
153
+
154
+ # Build rich notification with context
155
+ local full_title="$dim_emoji ONE: $title"
156
+ local full_msg="$msg
157
+
158
+ Cycle $CURRENT_CYCLE: $phase
159
+ Feature: $FEATURE_NAME
160
+ Org: $ORGANIZATION"
161
+
162
+ if command -v osascript &> /dev/null; then
163
+ # macOS - escape quotes in message
164
+ local escaped_msg=$(echo "$full_msg" | sed 's/"/\\"/g')
165
+ osascript -e "display notification \"$escaped_msg\" with title \"$full_title\"" 2>/dev/null || true
166
+ elif command -v notify-send &> /dev/null; then
167
+ # Linux
168
+ notify-send "$full_title" "$full_msg" 2>/dev/null || true
169
+ else
170
+ # Fallback to console
171
+ send_console "$title: $msg" "info"
172
+ fi
173
+ }
174
+
175
+ # File notification with ontology context
176
+ send_file() {
177
+ local msg="$1"
178
+ local type="$2"
179
+
180
+ # Get dimension info
181
+ local dim_info=$(get_dimension_info "$CURRENT_CYCLE")
182
+ local dim_emoji=$(echo "$dim_info" | cut -d'|' -f1)
183
+ local dimension=$(echo "$dim_info" | cut -d'|' -f2)
184
+ local phase=$(echo "$dim_info" | cut -d'|' -f3)
185
+
186
+ local notif_file="$CLAUDE_PROJECT_DIR/.claude/notifications.log"
187
+ local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
188
+
189
+ # Log with full ontology context
190
+ echo "[$timestamp] [$type] $msg" >> "$notif_file"
191
+ echo " → Cycle: $CURRENT_CYCLE | Dimension: $dimension | Phase: $phase" >> "$notif_file"
192
+ echo " → Feature: $FEATURE_NAME | Organization: $ORGANIZATION" >> "$notif_file"
193
+ }
194
+
195
+ # Notification templates with ontology awareness
196
+ get_template() {
197
+ # Get dimension info for context
198
+ local dim_info=$(get_dimension_info "$CURRENT_CYCLE")
199
+ local dimension=$(echo "$dim_info" | cut -d'|' -f2)
200
+
201
+ case "$1" in
202
+ # Ontology-specific events
203
+ "thing-created") echo "Created new thing entity in $dimension dimension" ;;
204
+ "connection-added") echo "Added connection relationship" ;;
205
+ "event-logged") echo "Logged event in audit trail" ;;
206
+ "knowledge-indexed") echo "Indexed knowledge for RAG" ;;
207
+ "group-updated") echo "Updated group configuration" ;;
208
+ "person-authorized") echo "Authorized person with role" ;;
209
+
210
+ # Build events
211
+ "build-start") echo "Build process started for $dimension" ;;
212
+ "build-success") echo "Build completed successfully in $dimension" ;;
213
+ "build-failure") echo "Build failed in $dimension phase" ;;
214
+
215
+ # Test events
216
+ "test-success") echo "All tests passed for $dimension" ;;
217
+ "test-failure") echo "Some tests failed in $dimension" ;;
218
+
219
+ # Security events
220
+ "security-warning") echo "Security warning detected in $dimension" ;;
221
+ "security-block") echo "Security block - operation prevented" ;;
222
+
223
+ # Session events
224
+ "session-start") echo "Claude Code session started" ;;
225
+ "session-end") echo "Claude Code session ended" ;;
226
+
227
+ # Cycle progress
228
+ "cycle-complete") echo "Completed Cycle $CURRENT_CYCLE ($dimension)" ;;
229
+ "cycle-start") echo "Starting Cycle $CURRENT_CYCLE ($dimension)" ;;
230
+
231
+ # Agent events
232
+ "agent-invoked") echo "AI agent invoked for $dimension work" ;;
233
+ "agent-completed") echo "AI agent completed $dimension task" ;;
234
+
235
+ # Deployment events
236
+ "deploy-start") echo "Deployment started" ;;
237
+ "deploy-success") echo "Deployment successful" ;;
238
+ "deploy-failure") echo "Deployment failed" ;;
239
+
240
+ # Default
241
+ *) echo "${MESSAGE:-$1}" ;;
242
+ esac
243
+ }
244
+
245
+ EXIT_CODE=0
246
+ NOTIFICATION_MESSAGE=$(get_template "$EVENT")
247
+
248
+ # Send notification
249
+ case "$CHANNEL" in
250
+ "console")
251
+ send_console "$NOTIFICATION_MESSAGE" "$TYPE"
252
+ ;;
253
+ "system")
254
+ send_system "$EVENT" "$NOTIFICATION_MESSAGE"
255
+ ;;
256
+ "file")
257
+ send_file "$NOTIFICATION_MESSAGE" "$TYPE"
258
+ ;;
259
+ "all")
260
+ send_console "$NOTIFICATION_MESSAGE" "$TYPE"
261
+ send_system "$EVENT" "$NOTIFICATION_MESSAGE"
262
+ send_file "$NOTIFICATION_MESSAGE" "$TYPE"
263
+ ;;
264
+ *)
265
+ echo "❌ Unknown channel: $CHANNEL"
266
+ EXIT_CODE=1
267
+ ;;
268
+ esac
269
+
270
+ # Log notification
271
+ if [ $EXIT_CODE -eq 0 ]; then
272
+ log_message "INFO" "Notification sent: $EVENT"
273
+ fi
274
+
275
+ # Log completion
276
+ END_TIME=$(get_time_ms)
277
+ log_hook_execution "notification-hook" "$EVENT $CHANNEL" "$START_TIME" "$END_TIME" "$EXIT_CODE"
278
+
279
+ exit $EXIT_CODE
@@ -0,0 +1,101 @@
1
+ #!/bin/bash
2
+
3
+ # Push to all remotes: main repo + subtrees + one.ie
4
+ # Usage: ./.claude/hooks/push.sh [all|main|one|web|oneie]
5
+ #
6
+ # CRITICAL: This script ALWAYS pulls before pushing to prevent branch divergence
7
+ # Rule: Always pull first, then push. Never push without pulling.
8
+
9
+ set -e
10
+
11
+ COMMAND="${1:-all}"
12
+
13
+ # ============================================================
14
+ # PULL FIRST - Prevent branch divergence
15
+ # ============================================================
16
+ pull_main() {
17
+ echo "🔄 Pulling latest from origin/main..."
18
+ if ! git pull origin main --ff-only 2>/dev/null; then
19
+ echo "⚠️ Fast-forward pull failed (branches may be diverged)"
20
+ echo "Attempting merge pull..."
21
+ git pull origin main --no-rebase
22
+ fi
23
+ echo "✅ Pulled latest changes"
24
+ }
25
+
26
+ push_main() {
27
+ # Pull first (CRITICAL - prevents divergence)
28
+ pull_main
29
+ echo ""
30
+ echo "📤 Pushing main repo to origin (one-ie/one)..."
31
+ git push origin main
32
+ echo "✅ Main repo pushed"
33
+ }
34
+
35
+ push_one() {
36
+ # Pull first (CRITICAL - prevents divergence)
37
+ pull_main
38
+ echo ""
39
+ echo "📤 Pushing /one subtree to one-repo (one-ie/ontology)..."
40
+ git push one-repo $(git subtree split --prefix one main):main --force
41
+ echo "✅ /one subtree pushed"
42
+ }
43
+
44
+ push_web() {
45
+ # Pull first (CRITICAL - prevents divergence)
46
+ pull_main
47
+ echo ""
48
+ echo "📤 Pushing /web subtree to web-repo (one-ie/web)..."
49
+ git push web-repo $(git subtree split --prefix web main):main --force
50
+ echo "✅ /web subtree pushed"
51
+ }
52
+
53
+ push_oneie() {
54
+ # Pull first (CRITICAL - prevents divergence)
55
+ pull_main
56
+ echo ""
57
+ echo "📤 Pushing to one.ie repo (one-ie/one.ie)..."
58
+ if [ -d "one.ie" ]; then
59
+ cd one.ie
60
+ # Pull in one.ie directory too
61
+ git pull origin main --ff-only 2>/dev/null || git pull origin main --no-rebase
62
+ git push origin main
63
+ cd ..
64
+ echo "✅ one.ie repo pushed"
65
+ else
66
+ echo "⚠️ one.ie directory not found, skipping"
67
+ fi
68
+ }
69
+
70
+ case "$COMMAND" in
71
+ all)
72
+ push_main
73
+ push_one
74
+ push_web
75
+ push_oneie
76
+ echo "🎉 All remotes synced!"
77
+ ;;
78
+ main)
79
+ push_main
80
+ ;;
81
+ one)
82
+ push_one
83
+ ;;
84
+ web)
85
+ push_web
86
+ ;;
87
+ oneie)
88
+ push_oneie
89
+ ;;
90
+ *)
91
+ echo "Usage: ./.claude/hooks/push.sh [all|main|one|web|oneie]"
92
+ echo ""
93
+ echo "Examples:"
94
+ echo " ./.claude/hooks/push.sh all # Push to all remotes"
95
+ echo " ./.claude/hooks/push.sh main # Push main repo only"
96
+ echo " ./.claude/hooks/push.sh one # Push /one subtree only"
97
+ echo " ./.claude/hooks/push.sh web # Push /web subtree only"
98
+ echo " ./.claude/hooks/push.sh oneie # Push one.ie repo only"
99
+ exit 1
100
+ ;;
101
+ esac
@@ -78,10 +78,19 @@ wait # Wait for all copies to complete
78
78
  echo -e "${GREEN}✓ All markdown files synced${NC}"
79
79
  echo ""
80
80
 
81
- # Step 4: Hooks reference (important note)
82
- echo -e "${BLUE}Step 4: Hooks configuration${NC}"
83
- echo -e "${GREEN}✓ Hooks reference root .claude/ (no duplication)${NC}"
84
- echo -e "${YELLOW} CLI uses root hooks via relative paths or environment setup${NC}"
81
+ # Step 4: Sync .claude/ to cli/.claude/ (agents, commands, hooks, skills)
82
+ echo -e "${BLUE}Step 4: Sync .claude/ to cli/.claude/${NC}"
83
+ if [ -d ".claude" ]; then
84
+ mkdir -p cli/.claude
85
+ for dir in agents commands hooks skills; do
86
+ if [ -d ".claude/$dir" ]; then
87
+ rsync -av --delete --quiet ".claude/$dir/" "cli/.claude/$dir/" 2>&1 | tail -1 || true
88
+ echo -e "${GREEN}✓ .claude/$dir/ synced${NC}"
89
+ fi
90
+ done
91
+ else
92
+ echo -e "${YELLOW}⚠ .claude/ directory not found, skipping${NC}"
93
+ fi
85
94
  echo ""
86
95
 
87
96
  # Step 5: Version bump (if not sync)
@@ -104,14 +113,13 @@ echo -e "${BLUE}Step 6: Commit cli/ changes${NC}"
104
113
  cd cli
105
114
  if [[ -n $(git status -s) ]]; then
106
115
  git add . > /dev/null 2>&1
107
- git commit -m "chore: sync /one documentation and markdown files
116
+ git commit -m "chore: sync /one, .claude/, and markdown files
108
117
 
109
118
  Synced from root repository:
110
119
  - /one/* → CLI documentation
120
+ - .claude/* → CLI automation (agents, commands, hooks, skills)
111
121
  - CLAUDE.md, README.md, LICENSE.md, SECURITY.md, AGENTS.md
112
122
 
113
- Note: Hooks remain in root .claude/ directory (single source of truth)
114
-
115
123
  🤖 Generated with [Claude Code](https://claude.com/claude-code)
116
124
 
117
125
  Co-Authored-By: Claude <noreply@anthropic.com>" > /dev/null 2>&1
@@ -190,6 +198,6 @@ fi
190
198
 
191
199
  echo -e "${BLUE}Synced:${NC}"
192
200
  echo " ✓ /one/* → cli/one/ (documentation)"
201
+ echo " ✓ .claude/* → cli/.claude/ (agents, commands, hooks, skills)"
193
202
  echo " ✓ CLAUDE.md, README.md, LICENSE.md, SECURITY.md, AGENTS.md"
194
- echo " ✓ Hooks reference root .claude/ (no duplication)"
195
203
  echo ""