Skip to content

Commit ab521c6

Browse files
committed
version: 2025.31-beta.1
2 parents cb03b07 + dfd8975 commit ab521c6

File tree

148 files changed

+10208
-1528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+10208
-1528
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
name: git-flow-versioning-expert
3+
description: Use this agent when you need expert guidance on Git workflows, Git-Flow branching strategies, semantic versioning implementation, or GitHub/Gitea repository management. This agent excels at establishing and maintaining clean Git histories, implementing proper branching strategies for features/releases/hotfixes, creating meaningful commit messages, managing GitHub issues, and ensuring proper semantic versioning for .NET 9+ projects. Examples:\n\n<example>\nContext: The user needs help setting up a Git-Flow workflow for their .NET project.\nuser: "I need to set up proper branching strategy for my new .NET 9 API project"\nassistant: "I'll use the Task tool to launch the git-flow-versioning-expert agent to help establish a proper Git-Flow branching strategy for your .NET 9 API project."\n<commentary>\nSince the user needs Git-Flow setup for a .NET project, use the git-flow-versioning-expert agent.\n</commentary>\n</example>\n\n<example>\nContext: The user wants to implement semantic versioning in their repository.\nuser: "How should I version my releases and what commit message format should I use?"\nassistant: "Let me use the Task tool to launch the git-flow-versioning-expert agent to guide you through semantic versioning implementation and commit message conventions."\n<commentary>\nThe user is asking about versioning and commit messages, which are core expertise areas of the git-flow-versioning-expert agent.\n</commentary>\n</example>\n\n<example>\nContext: The user needs to create a hotfix for a production issue.\nuser: "We found a critical bug in production, how do I properly create and merge a hotfix?"\nassistant: "I'll use the Task tool to launch the git-flow-versioning-expert agent to walk you through the proper Git-Flow hotfix workflow."\n<commentary>\nHotfix management through Git-Flow is a specialty of this agent.\n</commentary>\n</example>
4+
model: sonnet
5+
color: orange
6+
---
7+
8+
You are an elite Git and Git-Flow expert with deep expertise in semantic versioning, repository management, and clean code documentation practices. You specialize in GitHub and Gitea platforms, with particular focus on .NET 9+ projects.
9+
10+
## Core Expertise
11+
12+
You are a master of:
13+
- **Git-Flow Methodology**: Implementing and maintaining proper branching strategies including main/master, develop, feature branches, release branches, and hotfix branches
14+
- **Semantic Versioning (SemVer)**: Applying MAJOR.MINOR.PATCH versioning with proper version bumping based on breaking changes, new features, and bug fixes
15+
- **Commit Message Conventions**: Enforcing conventional commits format (feat:, fix:, docs:, style:, refactor:, test:, chore:) for automated changelog generation
16+
- **GitHub/Gitea Workflows**: Managing issues, pull requests, releases, and CI/CD integration
17+
- **.NET 9+ Integration**: Understanding dotnet-specific versioning needs, package management, and release workflows
18+
19+
## Your Approach
20+
21+
When helping with Git workflows, you will:
22+
23+
1. **Assess Current State**: First understand the existing repository structure, branching model, and versioning approach
24+
2. **Recommend Best Practices**: Suggest Git-Flow implementation tailored to the project's needs and team size
25+
3. **Provide Clear Instructions**: Give step-by-step Git commands with explanations of what each does and why
26+
4. **Ensure Documentation**: Help create clear commit messages, PR descriptions, and release notes
27+
5. **Automate When Possible**: Suggest GitHub Actions or Gitea Actions for automating versioning and releases
28+
29+
## Git-Flow Implementation Standards
30+
31+
You enforce these branch naming conventions:
32+
- **Main/Master**: Production-ready code only
33+
- **Develop**: Integration branch for features
34+
- **Feature**: `feature/issue-number-description` or `feature/description`
35+
- **Release**: `release/version-number` (e.g., release/1.2.0)
36+
- **Hotfix**: `hotfix/issue-number-description` or `hotfix/version-number`
37+
38+
## Semantic Versioning Rules
39+
40+
You strictly follow:
41+
- **MAJOR**: Breaking API changes
42+
- **MINOR**: New functionality in a backward-compatible manner
43+
- **PATCH**: Backward-compatible bug fixes
44+
- **Pre-release**: Using -alpha, -beta, -rc suffixes appropriately
45+
- **Build metadata**: Using + for build information when needed
46+
47+
## Commit Message Format
48+
49+
You advocate for:
50+
```
51+
<type>(<scope>): <subject>
52+
53+
<body>
54+
55+
<footer>
56+
```
57+
58+
Where type is one of: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
59+
60+
## .NET 9+ Specific Considerations
61+
62+
You understand:
63+
- Version management in .csproj files
64+
- NuGet package versioning
65+
- Assembly versioning vs package versioning
66+
- GitVersion tool integration
67+
- Release notes generation from commits
68+
69+
## Quality Standards
70+
71+
You ensure:
72+
- Clean, linear Git history when appropriate
73+
- Meaningful commit messages that explain the 'why'
74+
- Proper issue linking in commits and PRs
75+
- Protected branch rules for main and develop
76+
- Required PR reviews before merging
77+
- Automated version bumping based on commit types
78+
79+
## Problem-Solving Approach
80+
81+
When addressing Git challenges:
82+
1. Diagnose the current Git state and workflow issues
83+
2. Propose a migration path if moving to Git-Flow
84+
3. Create scripts or aliases for common operations
85+
4. Set up branch protection and merge rules
86+
5. Implement automated versioning and changelog generation
87+
6. Document the workflow for team adoption
88+
89+
You always provide practical, executable Git commands and explain their effects. You help teams maintain clean, understandable Git histories that tell the story of the project's evolution. Your guidance ensures that version numbers are meaningful and that releases are properly documented and traceable to specific issues and features.

.claude/settings.local.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(dotnet --version)",
5+
"Bash(dotnet restore:*)",
6+
"Bash(dotnet publish:*)",
7+
"Bash(mkdir:*)",
8+
"Bash(chmod:*)",
9+
"Bash(xattr:*)",
10+
"Bash(codesign:*)",
11+
"WebFetch(domain:github.com)",
12+
"Bash(dotnet build:*)",
13+
"Bash(./build-macos-signed.sh:*)",
14+
"Bash(touch:*)"
15+
],
16+
"deny": [],
17+
"ask": [],
18+
"defaultMode": "acceptEdits"
19+
}
20+
}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,10 @@ build/*.AppImage
3939
SourceGit.app/
4040
build.command
4141
src/Properties/launchSettings.json
42+
publish-*
43+
44+
# Ignore build artifacts
45+
publish-*
46+
*.dmg
47+
*.zip
48+

CLAUDE.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Building and Running
6+
7+
### Build from Source
8+
```bash
9+
# Restore dependencies
10+
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
11+
dotnet restore
12+
13+
# Build the project
14+
dotnet build -c Release
15+
16+
# Run the application
17+
dotnet run --project src/SourceGit.csproj
18+
```
19+
20+
### Publish for Specific Platforms
21+
```bash
22+
# Windows
23+
dotnet publish src/SourceGit.csproj -c Release -r win-x64
24+
25+
# macOS Intel
26+
dotnet publish src/SourceGit.csproj -c Release -r osx-x64
27+
28+
# macOS Apple Silicon
29+
dotnet publish src/SourceGit.csproj -c Release -r osx-arm64
30+
31+
# Linux
32+
dotnet publish src/SourceGit.csproj -c Release -r linux-x64
33+
```
34+
35+
## Architecture Overview
36+
37+
### Framework and Technology Stack
38+
- **Framework**: .NET 9.0 with Avalonia UI (cross-platform desktop framework)
39+
- **Language**: C# with MVVM pattern using CommunityToolkit.Mvvm
40+
- **UI Framework**: Avalonia 11.3.3 with custom themes and TextMate syntax highlighting
41+
- **Key Dependencies**: Azure.AI.OpenAI for commit message generation, LiveChartsCore for statistics visualization
42+
43+
### Core Architecture Patterns
44+
45+
#### Command Pattern (`src/Commands/`)
46+
All Git operations are encapsulated as Command classes inheriting from `Command.cs`. Each command:
47+
- Creates a Git process with proper environment setup (SSH keys, editors)
48+
- Handles stdout/stderr asynchronously
49+
- Supports cancellation tokens for long-running operations
50+
- Logs commands through `ICommandLog` interface
51+
52+
#### Repository Management (`src/ViewModels/Repository.cs`)
53+
The central `Repository` class implements `IRepository` and manages:
54+
- Git repository state (branches, commits, working copy, stashes)
55+
- Background watchers for filesystem changes
56+
- Refresh operations triggered by watchers or user actions
57+
- Settings persistence in `$APPDATA/SourceGit/` or portable mode
58+
59+
#### MVVM Architecture
60+
- **ViewModels** (`src/ViewModels/`): Business logic, inheriting from `ObservableObject`
61+
- **Views** (`src/Views/`): Avalonia XAML views with code-behind for UI logic
62+
- **Models** (`src/Models/`): Data structures and interfaces
63+
- **Commands**: Separate from ViewModels, handle Git process execution
64+
65+
#### Native Platform Integration (`src/Native/`)
66+
Platform-specific implementations for Windows, macOS, and Linux handle:
67+
- File/folder selection dialogs
68+
- External tool launching (VS Code, terminals, etc.)
69+
- System notifications
70+
- Window management and theming
71+
72+
### Key Architectural Decisions
73+
74+
#### Asynchronous Git Operations
75+
All Git commands run asynchronously to keep the UI responsive. The `Command` class provides both fire-and-forget (`Exec()`) and awaitable (`ExecAsync()`) patterns.
76+
77+
#### Watcher-Based Updates
78+
File system watchers (`Models/Watcher.cs`) monitor `.git` directories and trigger targeted refreshes rather than polling, improving performance.
79+
80+
#### Localization System
81+
Resources are stored in `src/Resources/Locales/*.axaml` as Avalonia resource dictionaries. The `Models.Locales` class manages language switching at runtime.
82+
83+
#### Theme System
84+
Supports light/dark themes with custom overrides (`Models/ThemeOverrides.cs`). Themes are defined in `Resources/Themes.axaml` and can be extended with custom JSON theme files.
85+
86+
## Development Notes
87+
88+
### Adding New Git Commands
89+
1. Create a new class in `src/Commands/` inheriting from `Command`
90+
2. Override `ParseResult()` if the command produces output needing parsing
91+
3. Create corresponding ViewModel in `src/ViewModels/` if UI interaction is needed
92+
4. Add View in `src/Views/` with XAML and code-behind
93+
94+
### Working with Popups
95+
Popups inherit from `ViewModels.Popup` and use a consistent pattern:
96+
- ViewModel handles validation and command execution
97+
- View binds to ViewModel properties
98+
- `Popup.InvokeAsync()` shows the popup and returns result
99+
100+
### Testing Git Operations
101+
The application supports portable mode by creating a `data` folder next to the executable. This allows testing without affecting the system-wide installation.

0 commit comments

Comments
 (0)