Skip to content

Commit 229f254

Browse files
author
raold
committed
Enable full autonomous mode - no prompts, auto-commit, auto-push
1 parent 91b2b4f commit 229f254

File tree

9 files changed

+247
-2
lines changed

9 files changed

+247
-2
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Claude Code First Prompt Hook
3+
# This script runs on the first user prompt to trigger startup behaviors
4+
5+
# Check if this is the first prompt of the session
6+
SESSION_FILE="/tmp/claude-session-$(basename "$CLAUDE_PROJECT_DIR")"
7+
8+
if [ ! -f "$SESSION_FILE" ]; then
9+
# Mark this session as started
10+
touch "$SESSION_FILE"
11+
12+
# Run the startup script
13+
if [ -f "$CLAUDE_PROJECT_DIR/.claude/hooks/on-startup.sh" ]; then
14+
"$CLAUDE_PROJECT_DIR/.claude/hooks/on-startup.sh"
15+
fi
16+
fi

.claude/hooks/on-startup.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,33 @@ if [ -f ".claude/agents/migrate-to-v2.py" ]; then
5656
fi
5757

5858
echo -e "\n${GREEN}✅ Startup checks complete${NC}"
59+
echo "============================================"
60+
61+
# Enable full autonomous mode - no prompts, no confirmations
62+
echo -e "\n${YELLOW}🚀 Enabling FULL AUTONOMOUS MODE${NC}"
63+
echo "============================================"
64+
65+
# Set environment variables for autonomous operation
66+
export CLAUDE_CODE_AUTONOMOUS="true"
67+
export CLAUDE_NO_CONFIRMATIONS="true"
68+
export CLAUDE_AUTO_COMMIT="true"
69+
export CLAUDE_AUTO_PUSH="true"
70+
export CLAUDE_SKIP_ALL_PROMPTS="true"
71+
72+
# Update CLAUDE.md to reflect autonomous mode
73+
if grep -q "AUTONOMOUS MODE ENABLED" CLAUDE.md; then
74+
echo -e "${GREEN}✓ Autonomous mode already documented${NC}"
75+
else
76+
echo -e "\n## 🚀 AUTONOMOUS MODE ENABLED\n- NO CONFIRMATIONS for any operations\n- AUTO-COMMIT when changes made\n- AUTO-PUSH to remote\n- NO PROMPTS - just execute\n" >> CLAUDE.md
77+
echo -e "${GREEN}✓ Updated CLAUDE.md with autonomous mode${NC}"
78+
fi
79+
80+
# Create autonomous mode marker file
81+
touch .claude/.autonomous-mode-enabled
82+
83+
echo -e "\n${GREEN}✅ FULL AUTONOMOUS MODE ACTIVE${NC}"
84+
echo "- No confirmations will be requested"
85+
echo "- Git commits will be automatic"
86+
echo "- Git pushes will be automatic"
87+
echo "- All operations will execute immediately"
5988
echo "============================================"
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"session_id": "startup-20250731-134609",
3+
"phases": {
4+
"assessment": {
5+
"start": 1753983969.519973,
6+
"status": "completed",
7+
"end": 1753983969.535626,
8+
"duration_ms": 15
9+
},
10+
"context_loading": {
11+
"start": 1753983969.5356271,
12+
"status": "completed",
13+
"end": 1753983969.536085,
14+
"duration_ms": 0
15+
},
16+
"agent_activation": {
17+
"start": 1753983969.536086,
18+
"status": "completed",
19+
"end": 1753983969.5361001,
20+
"duration_ms": 0
21+
},
22+
"environment_setup": {
23+
"start": 1753983969.5361001,
24+
"status": "completed",
25+
"end": 1753983969.5416949,
26+
"duration_ms": 5
27+
},
28+
"health_report": {
29+
"start": 1753983969.541697,
30+
"status": "completed",
31+
"end": 1753983969.541773,
32+
"duration_ms": 0
33+
}
34+
},
35+
"warnings": [
36+
"Docker not available",
37+
"Docker issue: Not running - run 'docker-compose up'",
38+
"PostgreSQL issue: Not accessible",
39+
"Redis issue: Not accessible"
40+
],
41+
"optimizations": [
42+
"context_caching",
43+
"smart_activation"
44+
],
45+
"agents_activated": 3,
46+
"token_usage_multiplier": 6,
47+
"health_score": 7,
48+
"startup_time_ms": 21,
49+
"optimizations_applied": 2
50+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"session_id": "startup-20250731-135710",
3+
"phases": {
4+
"assessment": {
5+
"start": 1753984630.510467,
6+
"status": "completed",
7+
"end": 1753984630.536462,
8+
"duration_ms": 25
9+
},
10+
"context_loading": {
11+
"start": 1753984630.536463,
12+
"status": "completed",
13+
"end": 1753984630.536903,
14+
"duration_ms": 0
15+
},
16+
"agent_activation": {
17+
"start": 1753984630.536903,
18+
"status": "completed",
19+
"end": 1753984630.5369139,
20+
"duration_ms": 0
21+
},
22+
"environment_setup": {
23+
"start": 1753984630.5369148,
24+
"status": "completed",
25+
"end": 1753984630.54086,
26+
"duration_ms": 3
27+
},
28+
"health_report": {
29+
"start": 1753984630.5408618,
30+
"status": "completed",
31+
"end": 1753984630.540921,
32+
"duration_ms": 0
33+
}
34+
},
35+
"warnings": [
36+
"Docker not available",
37+
"Docker issue: Not running - run 'docker-compose up'",
38+
"PostgreSQL issue: Not accessible",
39+
"Redis issue: Not accessible"
40+
],
41+
"optimizations": [
42+
"context_caching",
43+
"smart_activation"
44+
],
45+
"agents_activated": 3,
46+
"token_usage_multiplier": 6,
47+
"health_score": 7,
48+
"startup_time_ms": 30,
49+
"optimizations_applied": 2
50+
}

.claude/scripts/autonomous-git.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
# Autonomous Git Operations Helper
3+
# This script handles git operations without any prompts
4+
5+
# Function to auto-commit with smart message generation
6+
auto_commit() {
7+
# Check if there are changes
8+
if [[ -z $(git status -s) ]]; then
9+
return 0
10+
fi
11+
12+
# Stage all changes
13+
git add -A
14+
15+
# Generate commit message based on changes
16+
CHANGES=$(git diff --cached --name-status | head -5)
17+
FILE_COUNT=$(git diff --cached --name-only | wc -l | tr -d ' ')
18+
19+
if [[ $FILE_COUNT -eq 1 ]]; then
20+
FILE=$(git diff --cached --name-only)
21+
ACTION=$(git diff --cached --name-status | cut -f1)
22+
case $ACTION in
23+
A) MSG="Add $FILE" ;;
24+
M) MSG="Update $FILE" ;;
25+
D) MSG="Remove $FILE" ;;
26+
*) MSG="Modify $FILE" ;;
27+
esac
28+
else
29+
MSG="Update $FILE_COUNT files"
30+
fi
31+
32+
# Commit without any prompts
33+
git commit -m "$MSG" --no-verify --quiet
34+
echo "✓ Auto-committed: $MSG"
35+
}
36+
37+
# Function to auto-push without prompts
38+
auto_push() {
39+
BRANCH=$(git branch --show-current)
40+
git push origin $BRANCH --quiet 2>/dev/null || git push -u origin $BRANCH --quiet
41+
echo "✓ Auto-pushed to origin/$BRANCH"
42+
}
43+
44+
# Export functions for use in Claude
45+
export -f auto_commit
46+
export -f auto_push
47+
48+
# If called directly, run both
49+
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
50+
auto_commit
51+
auto_push
52+
fi

.claude/settings.local.json

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"env": {
44
"PYTHONPATH": ".",
55
"SECOND_BRAIN_ENV": "development",
6-
"CLAUDE_CODE_AUTONOMOUS": "true"
6+
"CLAUDE_CODE_AUTONOMOUS": "true",
7+
"CLAUDE_NO_CONFIRMATIONS": "true",
8+
"CLAUDE_AUTO_COMMIT": "true",
9+
"CLAUDE_AUTO_PUSH": "true",
10+
"CLAUDE_SKIP_ALL_PROMPTS": "true"
711
},
812
"permissions": {
913
"allow": [
@@ -22,8 +26,36 @@
2226
"Bash(bash:*)",
2327
"Bash(python3:*)",
2428
"WebFetch(domain:github.com)",
25-
"WebFetch(domain:raw.githubusercontent.com)"
29+
"WebFetch(domain:raw.githubusercontent.com)",
30+
"Bash(git push:*)",
31+
"Bash(git commit:*)",
32+
"Bash(echo:*)",
33+
"WebFetch(domain:docs.anthropic.com)",
34+
"Bash(ls:*)"
2635
],
2736
"deny": []
37+
},
38+
"hooks": {
39+
"SessionStart": [
40+
{
41+
"matcher": "startup",
42+
"hooks": [
43+
{
44+
"type": "command",
45+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/on-startup.sh"
46+
}
47+
]
48+
}
49+
],
50+
"UserPromptSubmit": [
51+
{
52+
"hooks": [
53+
{
54+
"type": "command",
55+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/check-first-prompt.sh"
56+
}
57+
]
58+
}
59+
]
2860
}
2961
}

.claude/startup-check-state.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"last_check": "2025-07-31T13:46:09.575721",
3+
"updates_applied": [],
4+
"updates_skipped": [],
5+
"check_count": 1,
6+
"success_count": 0
7+
}

.nova/Configuration.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"workspace.name" : "🧠 second-brain"
3+
}

CLAUDE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414

1515
## ⚠️ IMPORTANT USER PREFERENCES
1616
- **NO CO-AUTHOR LINES IN COMMITS** - User has requested multiple times not to include co-author attribution
17+
- **FULL AUTONOMOUS MODE** - NO PROMPTS, NO CONFIRMATIONS, JUST EXECUTE:
18+
- Auto-commit all changes without asking
19+
- Auto-push to remote without asking
20+
- Execute all operations immediately
21+
- No confirmations for any actions
22+
- User will interrupt or undo if needed
1723

1824
## 🚨 FOUNDATIONAL DEVELOPMENT PRINCIPLES
1925

0 commit comments

Comments
 (0)