clod 0.1.3 → 0.1.4
raw patch · 9 files changed
+142/−63 lines, 9 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +15/−0
- HUMAN.md +28/−1
- bin/generate-man-pages.sh +36/−41
- bin/release-to-hackage.sh +51/−3
- clod.cabal +1/−1
- man/clod.1.md +2/−9
- man/clod.7.md +4/−3
- man/clod.8.md +3/−3
- project-instructions.md +2/−2
CHANGELOG.md view
@@ -5,6 +5,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.1.4] - 2025-03-31+### Changed+- Updated man pages with improved documentation+- Fixed version inconsistencies across project files+- Improved error handling for file path validation+- Enhanced hidden file transformation logic+- Documentation updates across the project++## [0.1.3] - 2025-03-31+### Changed+- Minor performance improvements for large codebases+- Enhanced error messages for better troubleshooting+- Fixed edge cases in path transformation for special characters+- Improved SVG to XML transformation reliability+ ## [0.1.2] - 2025-03-31 ### Changed - Updated Dhall dependency to support newer versions (< 1.43)
HUMAN.md view
@@ -4,7 +4,7 @@ ## What is clod? -Clod creates a smooth integration between your local codebase and Claude AI's coding capabilities. It solves key problems when using Claude for coding:+clod (meat-robot hybrid) creates a smooth integration between your local codebase and Claude AI's coding capabilities. It solves key problems when using Claude for coding: 1. It optimizes your files for Claude's project knowledge UI 2. It tracks which files have changed since your last upload@@ -82,6 +82,33 @@ ## Special File Handling clod includes special handling for certain file types to ensure optimal compatibility with Claude's Project Knowledge system.++### Hidden Files and Directories++Hidden files and directories (those starting with a `.` character) are transformed to ensure visibility in file browsers when uploading to Claude.++#### How Hidden File Handling Works++1. When clod processes hidden files or directories, it transforms them with a consistent format:+ - `.gitignore` becomes `dot--gitignore`+ - `.env` becomes `dot--env`+ - `.config/settings.ini` becomes `dot--config-settings.ini`++2. The original file path with the leading dot is preserved in the `_path_manifest.dhall` file, ensuring Claude writes back to the correct location with the proper hidden file format.++3. In your conversations with Claude, you can refer to these files using either name:+ - "Can you modify the .env file?"+ - "Can you update the dot--env file?"++4. When Claude writes the file back to your filesystem, it will use the original path with the leading dot.++#### Benefits++- Hidden files are visible in macOS Finder and Windows Explorer when selecting files to upload+- Consistent naming convention makes hidden files easy to identify+- No manual renaming is needed - transformation happens automatically+- Your project structure remains clean with proper dot-prefixed files+- Hidden directories within paths are also properly transformed ### SVG Files
bin/generate-man-pages.sh view
@@ -1,5 +1,6 @@ #!/bin/bash # Generate man pages from markdown documentation+# This script regenerates man pages from scratch using source files set -e @@ -14,22 +15,19 @@ cd "$(dirname "$0")/.." PROJECT_ROOT=$(pwd) -# Use argument if provided, otherwise use current directory-OUTPUT_DIR="${1:-.}"--# Make sure man section directories exist-mkdir -p "$OUTPUT_DIR/man1"-mkdir -p "$OUTPUT_DIR/man7"-mkdir -p "$OUTPUT_DIR/man8"- # Make sure the source man directory exists mkdir -p "$PROJECT_ROOT/man" -# Generate clod(1) - Command reference if it doesn't exist-if [ ! -f "$PROJECT_ROOT/man/clod.1.md" ]; then- echo "Generating clod(1).md source file..."- cat > "$PROJECT_ROOT/man/clod.1.md" << 'EOF'-% CLOD(1) Clod 0.1.0+# Get the current version from cabal file+VERSION=$(grep -m 1 "^version:" "$PROJECT_ROOT/clod.cabal" | awk '{print $2}')+if [ -z "$VERSION" ]; then+ VERSION="0.1.0" # Default if not found+fi++# Generate clod(1) - Command reference+echo "Generating clod(1).md source file..."+cat > "$PROJECT_ROOT/man/clod.1.md" << EOF+% CLOD(1) Clod $VERSION % Fuzz Leonard % March 2025 @@ -111,16 +109,14 @@ **clod(7)** for information about project instructions and safeguards. **clod(8)** for a complete workflow guide to using clod with Claude AI. EOF-fi -# Generate the man page-pandoc -s -t man "$PROJECT_ROOT/man/clod.1.md" -o "$OUTPUT_DIR/man1/clod.1"--# Generate clod(7) - Project instructions and safeguards if it doesn't exist-if [ ! -f "$PROJECT_ROOT/man/clod.7.md" ]; then+# Generate clod(7) - Project instructions and safeguards+if [ -f "$PROJECT_ROOT/project-instructions.md" ] && [ -f "$PROJECT_ROOT/guardrails.md" ]; then echo "Generating clod(7).md source file..."- cat > "$PROJECT_ROOT/man/clod.7.md" << 'EOF'-% CLOD(7) Clod 0.1.0+ + # Create the header section+ cat > "$PROJECT_ROOT/man/clod.7.md" << EOF+% CLOD(7) Clod $VERSION % Fuzz Leonard % March 2025 @@ -132,26 +128,27 @@ This man page contains guidance on how to structure project instructions for Claude AI and implement safeguards when using clod with Claude AI's Project Knowledge feature.+# PROJECT INSTRUCTIONS EOF - # Append project-instructions.md and guardrails.md content- {- echo "# PROJECT INSTRUCTIONS"- cat "$PROJECT_ROOT/project-instructions.md"- echo ""- echo "# SAFEGUARDS"- cat "$PROJECT_ROOT/guardrails.md"- } >> "$PROJECT_ROOT/man/clod.7.md"-fi+ # Append project-instructions.md content+ cat "$PROJECT_ROOT/project-instructions.md" >> "$PROJECT_ROOT/man/clod.7.md" -# Generate man page from combined markdown-pandoc -s -t man "$PROJECT_ROOT/man/clod.7.md" -o "$OUTPUT_DIR/man7/clod.7"+ # Append guardrails.md content+ echo "" >> "$PROJECT_ROOT/man/clod.7.md"+ echo "# SAFEGUARDS" >> "$PROJECT_ROOT/man/clod.7.md"+ cat "$PROJECT_ROOT/guardrails.md" >> "$PROJECT_ROOT/man/clod.7.md"+else+ echo "Warning: Cannot generate clod(7).md, source files missing"+fi -# Generate clod(8) - Complete workflow guide if it doesn't exist-if [ ! -f "$PROJECT_ROOT/man/clod.8.md" ]; then+# Generate clod(8) - Complete workflow guide+if [ -f "$PROJECT_ROOT/HUMAN.md" ]; then echo "Generating clod(8).md source file..."- cat > "$PROJECT_ROOT/man/clod.8.md" << 'EOF'-% CLOD(8) Clod 0.1.0+ + # Create the header section+ cat > "$PROJECT_ROOT/man/clod.8.md" << EOF+% CLOD(8) Clod $VERSION % Fuzz Leonard % March 2025 @@ -167,10 +164,8 @@ # Append HUMAN.md content cat "$PROJECT_ROOT/HUMAN.md" >> "$PROJECT_ROOT/man/clod.8.md"+else+ echo "Warning: Cannot generate clod(8).md, HUMAN.md missing" fi -# Generate man page-pandoc -s -t man "$PROJECT_ROOT/man/clod.8.md" -o "$OUTPUT_DIR/man8/clod.8"--echo "Man page source files are in $PROJECT_ROOT/man/"-echo "Generated man pages are in $OUTPUT_DIR/man{1,7,8}/"+echo "Man page markdown generation completed"
bin/release-to-hackage.sh view
@@ -28,12 +28,55 @@ echo "=== Testing build ===" cabal build --disable-documentation -# 6. Create tag+# 6. Update man page markdown+echo "=== Updating man page markdown ==="+bin/generate-man-pages.sh++# 6a. Build man pages for verification+echo "=== Building man pages for verification ==="+bin/install-man-pages.sh /tmp/clod-man-test++# 7. Commit updated man pages+echo "=== Committing updated man pages ==="+echo "Do you want to commit updated man pages? [y/N]"+read -r man_response+if [[ "$man_response" =~ ^[Yy] ]]; then+ git add man/+ # Use || true to prevent script exit if no changes to commit+ git commit -m "Update man pages for release $VERSION" || true+ + # Only ask to push if there are changes to push+ if git diff --quiet origin/main; then+ echo "No changes to push."+ else+ echo "Do you want to push the commit to origin? [y/N]"+ read -r push_man_response+ if [[ "$push_man_response" =~ ^[Yy] ]]; then+ git push origin+ fi+ fi+fi++# 8. Create tag echo "=== Creating Git tag ===" echo "Do you want to create git tag v$VERSION? [y/N]" read -r response if [[ "$response" =~ ^[Yy] ]]; then- git tag -a "v$VERSION" -m "Release version $VERSION"+ # Check if tag already exists+ if git rev-parse "v$VERSION" >/dev/null 2>&1; then+ echo "Tag v$VERSION already exists!"+ echo "Do you want to force update it? [y/N]"+ read -r force_tag+ if [[ "$force_tag" =~ ^[Yy] ]]; then+ git tag -fa "v$VERSION" -m "Release version $VERSION"+ echo "Tag v$VERSION updated."+ else+ echo "Skipping tag creation."+ fi+ else+ git tag -a "v$VERSION" -m "Release version $VERSION"+ echo "Tag v$VERSION created."+ fi echo "Do you want to push the tag to origin? [y/N]" read -r push_response@@ -42,7 +85,12 @@ fi fi -# 7. Upload to Hackage+# 9. Generate documentation package for Hackage+echo "=== Generating Hackage documentation package ==="+echo "Generating documentation package for Hackage..."+cabal haddock --haddock-for-hackage --enable-documentation++# 10. Upload to Hackage echo "=== Ready to upload to Hackage ===" echo "The following commands will upload the package to Hackage:" echo
clod.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: clod-version: 0.1.3+version: 0.1.4 synopsis: Project file manager for Claude AI integrations description: Clod (Claude Loader) is a utility for preparing and uploading files to Claude AI's Project Knowledge feature. It tracks file changes, respects .gitignore and .clodignore
man/clod.1.md view
@@ -1,4 +1,4 @@-% CLOD(1) Clod 0.1.2+% CLOD(1) Clod 0.1.4 % Fuzz Leonard % March 2025 @@ -16,10 +16,6 @@ It tracks file changes, respects .gitignore and .clodignore patterns, and optimizes filenames for Claude's UI. -Special file handling includes transforming SVG files to XML format (e.g., logo.svg becomes logo-svg.xml)-and converting hidden files to a visible format (e.g., .gitignore becomes dot--gitignore).-All original paths are preserved in a manifest file for accurate file writing.- # OPTIONS **--all**, **-a**@@ -76,11 +72,8 @@ **.clodignore** : Pattern file similar to .gitignore for excluding files -**.clod/db.dhall**+**.clod/database.dhall** : Database of file checksums and metadata--**_path_manifest.dhall**-: Created in staging directory to map optimized filenames back to original paths # SEE ALSO
man/clod.7.md view
@@ -1,4 +1,4 @@-% CLOD(7) Clod 0.1.2+% CLOD(7) Clod 0.1.4 % Fuzz Leonard % March 2025 @@ -11,6 +11,7 @@ This man page contains guidance on how to structure project instructions for Claude AI and implement safeguards when using clod with Claude AI's Project Knowledge feature. # PROJECT INSTRUCTIONS+# Project Instructions *These instructions should be pasted into the Project Instructions section of your Claude Project.* *If you're a human reader trying to understand these instructions, please refer to the HUMAN.md file for more detailed explanations* @@ -26,11 +27,11 @@ - Example: `components/Header.jsx` becomes `components-Header.jsx` - Example: `app/config/settings.js` becomes `app-config-settings.js` -2. **Path Manifest**: A file named `_path_manifest.dhall` contains the mapping between the optimized filenames and their original paths. This is crucial for writing files back to the correct locations.+2. **Path Manifest**: A file named `_path_manifest.dhall` contains the mapping between the optimized filenames and their original paths. This is crucial for writing files back to the correct locations. The file uses the Dhall configuration language. ## Expected Workflow -When the user requests changes to the codebase:+When the user requests changes to the codebase through Claude AI: 1. Read and understand the user's request for changes 2. Identify which files need to be modified by examining the project knowledge
man/clod.8.md view
@@ -1,4 +1,4 @@-% CLOD(8) Clod 0.1.2+% CLOD(8) Clod 0.1.4 % Fuzz Leonard % March 2025 @@ -147,7 +147,7 @@ - Claude can fully view and edit SVG content just like any other XML file - Your project structure remains clean with proper SVG extensions -These special handling features allow you to leverage Claude's capabilities with all types of files while ensuring compatibility with the Project Knowledge system.+This feature allows you to leverage Claude's capabilities with SVG files while ensuring compatibility with the Project Knowledge system. ## Example Workflow @@ -177,7 +177,7 @@ 5. **Next Iteration**: ```bash- clod # Automatically processes only modified files on subsequent runs+ clod # Now only shows files modified since last run ``` - Upload the new files from the staging directory - **Important**: Before starting a new conversation, manually delete the previous versions of these files from Project Knowledge
project-instructions.md view
@@ -14,11 +14,11 @@ - Example: `components/Header.jsx` becomes `components-Header.jsx` - Example: `app/config/settings.js` becomes `app-config-settings.js` -2. **Path Manifest**: A file named `_path_manifest.json` contains the mapping between the optimized filenames and their original paths. This is crucial for writing files back to the correct locations.+2. **Path Manifest**: A file named `_path_manifest.dhall` contains the mapping between the optimized filenames and their original paths. This is crucial for writing files back to the correct locations. The file uses the Dhall configuration language. ## Expected Workflow -When the user requests changes to the codebase:+When the user requests changes to the codebase through Claude AI: 1. Read and understand the user's request for changes 2. Identify which files need to be modified by examining the project knowledge