#!/bin/bash # Script to compile all markdown files in tools/guidelines into CLAUDE.md # Get the root directory of the project ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" # Path to guidelines directory GUIDELINES_DIR="${ROOT_DIR}/tools/guidelines" # Path to output file OUTPUT_FILE="${ROOT_DIR}/CLAUDE.md" # Create the header for CLAUDE.md cat > "${OUTPUT_FILE}" << EOL # CLAUDE.md EOL # Add content from each markdown file in guidelines for guideline_file in "${GUIDELINES_DIR}"/*.md; do if [ -f "$guideline_file" ]; then # Add a newline for separation echo "" >> "${OUTPUT_FILE}" # Append the content of the guideline file cat "$guideline_file" >> "${OUTPUT_FILE}" fi done echo "Guidelines have been compiled into ${OUTPUT_FILE}"