1 Commits

Author SHA1 Message Date
d6d60355fd Implement mandatory bootstrap process with strict workflow
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.
2025-09-05 07:52:14 -05:00
2 changed files with 138 additions and 15 deletions

View File

@@ -2,26 +2,53 @@
**FOR: Gemini-CLI, Claude, OpenCode, all AI tools working with CTO delegation template**
## CRITICAL SETUP (FIRST TIME ONLY)
**This template requires initial git setup:**
## 🚨 MANDATORY FIRST STEP - BOOTSTRAP PROCESS
**EVERY AI AGENT MUST EXECUTE THIS EXACT SEQUENCE IMMEDIATELY:**
### Step 1: Git Repository Setup (REQUIRED)
```bash
git init
git add .
git commit -m "Initial commit from CTO template"
git commit -m "Initial commit from CTO delegation template"
git branch -M main
git remote add origin YOUR_REPO_URL
git push -u origin main
```
**Create required branches:**
### Step 2: Create Bootstrap Branch (REQUIRED)
```bash
git checkout -b bootstrap
git push -u origin bootstrap
```
### Step 3: Create Workflow Branches (REQUIRED)
```bash
git checkout -b INTEGRATION-WIP && git push -u origin INTEGRATION-WIP
git checkout -b RELEASE && git push -u origin RELEASE
git checkout main
git checkout bootstrap
```
### Step 4: Update Template Files (REQUIRED)
**You MUST update these template placeholders IMMEDIATELY:**
1. Update `docs/WORKLOG-LLM.md` - Fill ALL `[BRACKETED_FIELDS]`
2. Update `docs/CURRENTWORK-LLM.md` - Fill project info section
3. Commit bootstrap setup:
```bash
git add .
git commit -m "Bootstrap: Initialize project with CTO delegation template"
git push origin bootstrap
```
### Step 5: Tag Bootstrap Milestone (REQUIRED)
```bash
git tag -a bootstrap-complete -m "CTO delegation template bootstrap completed - project ready for AI development"
git push origin bootstrap-complete
```
**⚠️ CRITICAL: You are now on `bootstrap` branch and MUST remain here for initial project setup work.**
## CRITICAL RULES
1. NEVER work on `main` branch - Always use feature branches
1. **NEVER TOUCH `main` BRANCH** - Main is HUMAN-ONLY, AI agents use `bootstrap` as base
2. NEVER auto-delete feature branches - Preserve all branches permanently
3. ALWAYS push before switching branches - Never lose work
4. Push every 10 commits max - Keep work backed up
@@ -32,8 +59,8 @@ git checkout main
**Start new feature (EXACT sequence):**
```bash
git checkout main
git pull origin main
git checkout bootstrap
git pull origin bootstrap
git checkout -b feature/TASK-NAME
```
@@ -44,26 +71,40 @@ git commit -m "SPECIFIC_DESCRIPTION_OF_CHANGES"
git push origin CURRENT-BRANCH-NAME
```
**Tag completed milestone:**
**Tag completed milestone (ALWAYS PUSH):**
```bash
git tag -a MILESTONE-NAME -m "DETAILED_DESCRIPTION_OF_COMPLETION"
git push origin MILESTONE-NAME
```
## BRANCH STRUCTURE (CREATE THESE)
- **`main`** - Stable, protected, no direct commits
## BRANCH STRUCTURE (CREATED BY BOOTSTRAP)
- **`main`** - **HUMAN-ONLY** - Never touched by AI agents (template baseline)
- **`bootstrap`** - AI agents' base branch for all work (template setup and development)
- **`INTEGRATION-WIP`** - Auto-merge target for testing features
- **`RELEASE`** - Manual PR target for production releases
- **`feature/TASK-NAME`** - All development work (descriptive names)
- **`feature/TASK-NAME`** - All development work branches from bootstrap (descriptive names)
## DETERMINISTIC WORKFLOW
1. **Always start from main:** `git checkout main && git pull origin main`
### Phase 1: Bootstrap (FIRST SESSION ONLY)
1. **Execute mandatory bootstrap process above** (Steps 1-5)
2. **Work on bootstrap branch** for initial template setup
3. **Add READYSET and template files** (future enhancement)
4. **Tag bootstrap-complete** when setup finished
### Phase 2: Feature Development (ONGOING)
1. **Always start from bootstrap:** `git checkout bootstrap && git pull origin bootstrap`
2. **Create specific branch:** `git checkout -b feature/EXACT-TASK-NAME`
3. **Work in small chunks:** Commit every logical change
4. **Push frequently:** Every 5-10 commits or before any branch switch
5. **Never delete branches:** Preserve all feature branches permanently
6. **Tag milestones:** When features/stages complete
### Phase 3: Integration & Release
1. **Features auto-merge to INTEGRATION-WIP** (testing)
2. **Manual PRs to RELEASE** (production)
3. **Never delete any branches** (complete history preservation)
## MILESTONE TAGGING (DETERMINISTIC)
**When to tag:**
- Feature completely implemented and tested
@@ -75,6 +116,12 @@ git push origin MILESTONE-NAME
- `milestone-YYYY-MM-DD-DESCRIPTION` (date+description)
- `stage-NAME-done` (stage complete)
**ALWAYS push tags immediately:**
```bash
git tag -a TAG-NAME -m "DESCRIPTION"
git push origin TAG-NAME
```
## WORKLOG MAINTENANCE (MANDATORY)
**Update these files every session:**
- **docs/WORKLOG-LLM.md** - Current status, progress, next actions

76
start-ai-delegation.sh Executable file
View File

@@ -0,0 +1,76 @@
#!/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!"