Tags: licht1stein/brepl
Tags
Remove automatic bracket fixing mentions from skill guide Remove all references to automatic bracket fixing to encourage Claude to write correct code from the start. The auto-fixing remains as a transparent safety net, but agents are no longer told about it to maintain code quality discipline. Update critical rule #5 from "Trust automatic fixing" to "Write correct Clojure" emphasizing proper bracket balancing and valid syntax. Bump version to 2.3.1
Allow positional arguments as implicit eval mode (#9) * Allow positional arguments as implicit eval mode Positional arguments without flags now default to `-e` (eval mode), making the heredoc pattern simpler: `brepl "$(cat <<'EOF' ... EOF)"` works without requiring explicit `-e` flag. Implementation uses babashka.cli `:args->opts` to map first positional argument to `:e` option. Boolean flags (`:verbose`, `:version`, `:help`, `:hook`) now use `:coerce :boolean` to prevent consuming following args. All existing explicit flag usage (`-e`, `-f`, `-m`) unchanged. Tests verify backward compatibility and new positional arg behavior with various flag combinations. Updated help text and SKILL.md to document optional `-e` flag. * Update skill guide to use simpler positional argument syntax Remove unnecessary `-e` flags from all examples in SKILL.md. The heredoc pattern now shows `brepl "$(cat <<'EOF' ... EOF)"` instead of `brepl -e "$(cat <<'EOF' ... EOF)"`. Updated both project skill (.claude/skills/brepl) and resources (resources/skills/brepl) so `brepl hook install` syncs the latest version on every run. * Archive default-heredoc-eval change and create cli-interface spec Archive completed change to openspec/changes/archive/2025-11-19-default-heredoc-eval/ with proposal, tasks, and spec deltas. Create new cli-interface spec documenting positional argument behavior: - Default to eval mode for positional arguments - Backward compatibility with explicit flags - Clear error messages for invalid input Spec includes 3 requirements with comprehensive scenarios covering heredoc patterns, flag combinations, and error cases. * Bump version to 2.3.0 * Fix missing closing parens in positional-argument-test * Add positional argument tests in separate file Extract positional argument tests to test/positional_args_test.clj to avoid bracket balancing issues. Tests cover heredoc patterns, flag combinations, hook mode, verbose mode, and backward compatibility with explicit flags.
Accept auto-resolved keywords in validation (#7) * Accept auto-resolved keywords in validation Configure edamame parser with `:auto-resolve` to accept `::keyword` syntax as valid Clojure without requiring namespace resolution context. Changes: - Add `:auto-resolve '{:current user}` to edamame config in `delimiter-error?` - Add comprehensive test coverage for auto-resolved keywords - Add `bb version-bump` task to update version across all files - Bump version to 2.1.1 Fixes validation errors when validating code containing `::init`, `::halt`, or other auto-resolved keywords. * Document version management and release procedure * Use identity for auto-resolve instead of map Simpler and more flexible - handles any namespace alias without configuration while still validating syntax correctly.
Add Claude Code hook integration with auto-fix and validation - v2.0.0 ( #2) * Add Claude Code hook integration with auto-fix and backup Implement `brepl hook` subcommands for AI-assisted Clojure development: - `validate` - Pre-edit syntax checking with recursive bracket auto-fix - `eval` - Post-edit file evaluation via nREPL with warnings - `install` - Write hooks to .claude/settings.local.json - `uninstall` - Remove hooks configuration - `session-end` - Clean up session backup files Auto-fix uses edamame parser to recursively close unclosed brackets and braces. Backup system creates session-specific copies before edits for safe restoration on syntax or evaluation errors. Hook installer writes to .claude/settings.local.json with idempotent operations that preserve existing settings. Bump version 1.3.1 -> 1.4.0 * Update README with AI-assisted development section Replace old hook flag documentation with new `brepl hook` subcommands. Explain lightweight integration approach for REPL-driven development with AI agents—no additional servers or complex configurations required. Add sections for: - Quick setup with `brepl hook install` - Hook command reference (validate, eval, install, uninstall, session-end) - Auto-fix and backup/recovery workflows - Project-aware multi-REPL support - Comparison with heavier protocol-based alternatives Update version references 1.3.1 -> 1.4.0 * Add bbin installation support to bb.edn * Auto-fix extra closing brackets by removing from end Extend auto-fix to handle both missing and extra delimiters. When edamame reports "Unmatched delimiter" (extra closing bracket), remove characters from the end recursively until valid. Handles cases like: - `(+ 1 1))` -> `(+ 1 1)` - `((+ 1 2))))` -> `((+ 1 2))` - `[(+ 1 2))` -> `[(+ 1 2)]` (removes extra, adds missing) Uses `parse-string-all` instead of `parse-string` to catch trailing delimiters after the first form. * Document auto-fix design and parinfer comparison Add detailed analysis comparing edamame-based auto-fix with parinfer-rust, showing 94.9% agreement across 39 test cases. Document design decision to use edamame for zero-dependency installation. Update README to explain auto-fix implementation choice: - Pure Clojure solution with no binary dependencies - Works anywhere Babashka runs - Matches parinfer quality for 95% of cases - Trade-offs clearly documented (anonymous functions, complex multi-form) Skip string literal auto-fix to prevent incorrect quote insertion. String errors now block with clear message instead of corrupting code. Add BRACKET_AUTO_FIX_ANALYSIS.md with comprehensive test results and comparison methodology for future reference. * Reorder installation options: bbin, Nix, manual Prioritize bbin as recommended install method, followed by Nix, then manual clone. All three methods provide full functionality including hook modules for AI-assisted development. Remove curl-only option that would install incomplete package without `lib/` directory. * Bump version to 2.0.0 for breaking change BREAKING CHANGE: Single-file installation no longer supported. Hook features require `lib/` directory with validation modules. Changes: - Update version 1.4.0 -> 2.0.0 in brepl and package.nix - Fix test for error message format ("Could not" vs "Unable to") - Update package.nix to install lib/ directory alongside brepl script - Update README version references Supported installation methods: 1. bbin (recommended) 2. Nix 3. Manual clone All methods include full lib/ directory for hook functionality. * Position as zero-dependency alternative to external tools Clarify competitive positioning against solutions requiring parinfer-rust binary or MCP protocol servers. Emphasize brepl's pure Clojure approach using Babashka's built-in edamame parser. Add explicit comparison: 1. Protocol servers + external binaries (parinfer-rust, MCP) 2. brepl hooks (pure Clojure, zero external dependencies) Highlight trade-offs: - 94.9% agreement with parinfer-rust for bracket correction - No installation friction (works anywhere Babashka runs) - 5% edge cases degrade gracefully with clear errors Add v2.0.0 breaking change notice at top of README.
PreviousNext