The import statement was incorrectly placed inside a function body, which is invalid Python syntax. Moved to module-level imports. Also updated requirements to include difflib (part of stdlib, no pip install needed). Refs: #11
Enhancements: - Added apply_diff() method for unified diff-based file updates - Added commit_changes() with size delta quality gate (default 50%) - Size delta gate blocks commits that exceed threshold to prevent data loss - Auto-detects create vs replace operations - Generates contextual commit messages from diffs - Added _apply_unified_diff() helper for parsing and applying patches - Added _generate_diff_commit_message() for auto-generating commit messages Quality Gates: - Files exceeding max_delta_percent (default 50%) are rejected - Returns helpful guidance to use apply_diff() instead - Prevents LLM accidental full file replacements Refs: #11
Implements the gitea_coder role with full file/branch operations and commit message generation. Features: - Branch creation with scope gating (prevents main pushes) - Enforces branch naming conventions (feature/, fix/, refactor/, etc.) - Generates detailed commit messages with ticket references - Creates PRs from branches - Reads ticket requirements from issues - Unified file operations workflow Technical: - Uses existing gitea/dev.py operations - Validates branch names against scope patterns - Auto-generates commit messages with issue references - Caches default branch per chat_id for session persistence Refs: #11