CRITICAL FIXES: - MANDATORY bootstrap process as first step for all AI projects - STRICT main branch protection: HUMAN-ONLY, AI never touches main - Bootstrap branch as AI base for all development work - Deterministic 5-step bootstrap sequence with exact commands - ALL tags must be pushed to remote immediately after creation BOOTSTRAP AUTOMATION: - Add start-ai-delegation.sh script for Claude CLI automation - Complete setup validation and error checking - Automatic prompt with CTO delegation instructions WORKFLOW DETERMINISM: - Phase 1: Bootstrap (mandatory first session) - Phase 2: Feature development from bootstrap branch - Phase 3: Integration and release through proper branches - All feature branches created from bootstrap, not main Ready for CTO AI delegation with complete main branch protection.
76 lines
2.7 KiB
Bash
Executable File
76 lines
2.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# CTO AI Delegation Automation Script
|
|
# Automatically invokes Claude with the CTO delegation template instructions
|
|
|
|
set -e # Exit on any error
|
|
|
|
echo "🚀 CTO AI Delegation Template - Starting Claude with Instructions"
|
|
echo "=================================================="
|
|
|
|
# Check if Claude CLI is installed
|
|
if ! command -v claude &> /dev/null; then
|
|
echo "❌ Error: Claude CLI not found!"
|
|
echo "📦 Install with: npm install -g @anthropic-ai/claude-code"
|
|
echo "📚 See: https://docs.anthropic.com/en/docs/claude-code/setup"
|
|
exit 1
|
|
fi
|
|
|
|
# Check if we're in a directory with the template
|
|
if [ ! -f "docs/AGENT-LLM.MD" ]; then
|
|
echo "❌ Error: CTO delegation template not found!"
|
|
echo "📁 Make sure you're in a directory with the extracted template"
|
|
echo "📋 Expected: docs/AGENT-LLM.MD should exist"
|
|
exit 1
|
|
fi
|
|
|
|
# Check if git is initialized
|
|
if [ ! -d ".git" ]; then
|
|
echo "⚠️ Git repository not initialized yet"
|
|
echo "🔧 The AI agent will initialize it as part of the bootstrap process"
|
|
else
|
|
echo "✅ Git repository detected"
|
|
fi
|
|
|
|
echo ""
|
|
echo "🤖 Starting Claude with CTO delegation instructions..."
|
|
echo "📋 Claude will read docs/AGENT-LLM.MD and execute the bootstrap process"
|
|
echo "🚨 CRITICAL: Main branch is HUMAN-ONLY - AI will work on bootstrap branch"
|
|
echo ""
|
|
|
|
# Prompt for repository URL if not already configured
|
|
if [ ! -d ".git" ]; then
|
|
echo "🔗 You'll need your repository URL for the bootstrap process"
|
|
read -p "📥 Enter your repository URL (or press Enter to set later): " REPO_URL
|
|
if [ ! -z "$REPO_URL" ]; then
|
|
echo "📝 Repository URL: $REPO_URL"
|
|
echo "💡 Tell Claude to use this URL when prompted"
|
|
fi
|
|
echo ""
|
|
fi
|
|
|
|
# Create the prompt for Claude
|
|
PROMPT="I am a CTO using the AI delegation template. Please read and execute the instructions in docs/AGENT-LLM.MD immediately.
|
|
|
|
Key requirements:
|
|
1. Execute the MANDATORY BOOTSTRAP PROCESS first (Steps 1-5)
|
|
2. NEVER touch the main branch - it's HUMAN-ONLY
|
|
3. Work on the bootstrap branch for all AI development
|
|
4. Follow the exact deterministic command sequences
|
|
5. Update all template placeholders in the worklog files
|
|
6. Be extremely strict about the git workflow
|
|
|
|
Start by reading docs/AGENT-LLM.MD and executing the bootstrap process now."
|
|
|
|
# Start Claude with the instructions
|
|
echo "🎯 Invoking Claude with CTO delegation instructions..."
|
|
echo "=================================================="
|
|
claude -p "$PROMPT"
|
|
|
|
echo ""
|
|
echo "✅ Claude session completed"
|
|
echo "📋 Check your repository for the bootstrap branch and milestone tag"
|
|
echo "🏷️ Look for: bootstrap-complete tag"
|
|
echo "🌳 Verify branches: bootstrap, INTEGRATION-WIP, RELEASE"
|
|
echo ""
|
|
echo "🚀 Your CTO AI delegation framework is ready!" |