feat(gitea): critical refactor - automatic branch management (v1.0.0)

CRITICAL ARCHITECTURAL CHANGE:
- LLM no longer manages branch names - system derives from chat_id
- All operations automatically use current working branch from chat_id session
- Branch parameter REMOVED from all operation functions
- Added _get_working_branch() helper for automatic branch detection
- Added _generate_branch_name() for system-managed branch naming
- All functions now use __chat_id__ parameter for branch detection

Complete file operations (NO branch parameter needed!):
- apply_diff() - diff-based updates
- commit_changes() - commit with size delta gating  
- create_file() - create new files
- replace_file() - replace entire file
- delete_file() - delete files  NEW
- rename_file() - rename files  NEW
- get_file() - read files
- list_files() - list directory contents

Updated workflow:
- create_feature_branch() generates branch name from issue_number + scope
- System caches: chat_id → working_branch
- All file operations use cached working branch from chat_id
- LLM focuses on code/content, not infrastructure

All functions now:
- Use __chat_id__ parameter for branch detection (REQUIRED)
- Get working branch from session cache (system-managed)
- Never accept branch names from LLM input

Documentation updated:
- workflow_summary() shows critical change notice
- All function docs updated to reflect automatic branch management
- Examples updated to show __chat_id__ usage

Version remains 1.0.0 (no release yet)

Refs: #11
This commit is contained in:
2026-01-17 16:39:02 +00:00
parent abf6186976
commit 9ec4bb3491

File diff suppressed because it is too large Load Diff