# Blog Setup Interactive setup wizard to create blog constitution (`.spec/blog.spec.json`). ## Usage ```bash /blog-setup ``` This command creates a bash script in `/tmp/` and executes it interactively to gather your blog configuration. ## What It Does 1. Generates interactive setup script in `/tmp/blog-kit-setup-[timestamp].sh` 2. Prompts for blog configuration (name, context, tone, voice rules) 3. Creates `.spec/blog.spec.json` with your configuration 4. Validates JSON structure 5. Creates `CLAUDE.md` in content directory (documents constitution as source of truth) 6. Cleans up temporary script ## Instructions Generate and execute the following bash script: ```bash # Generate unique script name SCRIPT="/tmp/blog-kit-setup-$(date +%s).sh" # Create interactive setup script cat > "$SCRIPT" <<'SCRIPT_EOF' #!/bin/bash # Blog Kit Setup Wizard # ====================== clear echo "╔════════════════════════════════════════╗" echo "║ Blog Kit - Setup Wizard ║" echo "╚════════════════════════════════════════╝" echo "" echo "This wizard will create .spec/blog.spec.json" echo "with your blog configuration." echo "" # Prompt: Blog Name echo "📝 Blog Configuration" echo "─────────────────────" read -p "Blog name: " blog_name # Validate non-empty while [ -z "$blog_name" ]; do echo "❌ Blog name cannot be empty" read -p "Blog name: " blog_name done # Prompt: Context echo "" read -p "Context (e.g., 'Tech blog for developers'): " context while [ -z "$context" ]; do echo "❌ Context cannot be empty" read -p "Context: " context done # Prompt: Objective echo "" read -p "Objective (e.g., 'Generate qualified leads'): " objective while [ -z "$objective" ]; do echo "❌ Objective cannot be empty" read -p "Objective: " objective done # Prompt: Tone echo "" echo "🎨 Select tone:" echo " 1) Expert (technical, authoritative)" echo " 2) Pédagogique (educational, patient)" echo " 3) Convivial (friendly, casual)" echo " 4) Corporate (professional, formal)" read -p "Choice (1-4): " tone_choice case $tone_choice in 1) tone="expert" ;; 2) tone="pédagogique" ;; 3) tone="convivial" ;; 4) tone="corporate" ;; *) echo "⚠️ Invalid choice, defaulting to 'pédagogique'" tone="pédagogique" ;; esac # Prompt: Languages echo "" read -p "Languages (comma-separated, e.g., 'fr,en'): " languages languages=${languages:-"fr"} # Default to fr if empty # Prompt: Content Directory echo "" read -p "Content directory (default: articles): " content_dir content_dir=${content_dir:-"articles"} # Default to articles if empty # Prompt: Voice DO echo "" echo "✅ Voice guidelines - DO" echo "What should your content be?" echo "Examples: Clear, Actionable, Engaging, Technical, Data-driven" read -p "DO (comma-separated): " voice_do while [ -z "$voice_do" ]; do echo "❌ Please provide at least one DO guideline" read -p "DO (comma-separated): " voice_do done # Prompt: Voice DON'T echo "" echo "❌ Voice guidelines - DON'T" echo "What should your content avoid?" echo "Examples: Jargon, Vague claims, Salesy language, Passive voice" read -p "DON'T (comma-separated): " voice_dont while [ -z "$voice_dont" ]; do echo "❌ Please provide at least one DON'T guideline" read -p "DON'T (comma-separated): " voice_dont done # Generate JSON echo "" echo "📄 Generating configuration..." # Create .spec directory mkdir -p .spec # Convert comma-separated strings to JSON arrays voice_do_json=$(echo "$voice_do" | sed 's/,\s*/","/g' | sed 's/^/"/' | sed 's/$/"/') voice_dont_json=$(echo "$voice_dont" | sed 's/,\s*/","/g' | sed 's/^/"/' | sed 's/$/"/') languages_json=$(echo "$languages" | sed 's/,\s*/","/g' | sed 's/^/"/' | sed 's/$/"/') # Generate timestamp timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ") # Create JSON file cat > .spec/blog.spec.json </dev/null 2>&1; then if python3 -m json.tool .spec/blog.spec.json > /dev/null 2>&1; then echo "✅ JSON validation passed" else echo "❌ JSON validation failed" echo "Please check .spec/blog.spec.json manually" exit 1 fi else echo "⚠️ python3 not found, skipping JSON validation" echo " (Validation will happen when agents run)" fi # Generate CLAUDE.md in content directory echo "" echo "📄 Generating CLAUDE.md in content directory..." # Create content directory if it doesn't exist mkdir -p "$content_dir" # Determine tone behavior based on selected tone case $tone in "expert") tone_behavior="Technical depth, assumes reader knowledge, industry terminology" ;; "pédagogique") tone_behavior="Educational approach, step-by-step explanations, learning-focused" ;; "convivial") tone_behavior="Friendly and approachable, conversational style, personal touch" ;; "corporate") tone_behavior="Professional and formal, business-oriented, ROI-focused" ;; esac # Generate CLAUDE.md with constitution as source of truth cat > "$content_dir/CLAUDE.md" <