Skip to content
Merged
44 changes: 44 additions & 0 deletions .justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# .justfile for project management

pr_prep_patch:
git fetch origin
git checkout main
git pull origin main
git checkout -
git merge main
uv run ruff format
uv run ruff check --fix
uv lock -U
uv version --bump patch
uv build
git add .
git commit -m 'automated commit from just pr_prep_patch'

pr_prep_minor:
git fetch origin
git checkout main
git pull origin main
git checkout -
git merge main
uv run ruff format
uv run ruff check --fix
uv lock -U
uv version --bump minor
uv build
git add .
git commit -m 'automated commit from just pr_prep_minor'


pr_prep_major:
git fetch origin
git checkout main
git pull origin main
git checkout -
git merge main
uv run ruff format
uv run ruff check --fix
uv lock -U
uv version --bump major
uv build
git add .
git commit -m 'automated commit from just pr_prep_major'
145 changes: 145 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "PR Prep: Patch",
"type": "shell",
"command": "just",
"args": ["pr_prep_patch"],
"group": {
"kind": "build",
"isDefault": false
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": [],
"detail": "Prepare PR with patch version bump",
"icon": {
"id": "git-pull-request",
"color": "terminal.ansiGreen"
}
},
{
"label": "PR Prep: Minor",
"type": "shell",
"command": "just",
"args": ["pr_prep_minor"],
"group": {
"kind": "build",
"isDefault": false
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": [],
"detail": "Prepare PR with minor version bump",
"icon": {
"id": "git-pull-request",
"color": "terminal.ansiBlue"
}
},
{
"label": "PR Prep: Major",
"type": "shell",
"command": "just",
"args": ["pr_prep_major"],
"group": {
"kind": "build",
"isDefault": false
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": [],
"detail": "Prepare PR with major version bump",
"icon": {
"id": "git-pull-request",
"color": "terminal.ansiRed"
}
},
{
"label": "Code Quality: Format & Lint",
"type": "shell",
"command": "uv",
"args": ["run", "ruff", "format"],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": [],
"detail": "Format code with ruff",
"icon": {
"id": "code",
"color": "terminal.ansiYellow"
},
"dependsOrder": "sequence",
"dependsOn": ["Code Quality: Lint Fix"]
},
{
"label": "Code Quality: Lint Fix",
"type": "shell",
"command": "uv",
"args": ["run", "ruff", "check", "--fix"],
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": [],
"detail": "Fix linting issues with ruff",
"icon": {
"id": "tools",
"color": "terminal.ansiYellow"
}
},
{
"label": "Dependencies: Update Lock",
"type": "shell",
"command": "uv",
"args": ["lock", "-U"],
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": [],
"detail": "Update dependency lock file",
"icon": {
"id": "package",
"color": "terminal.ansiCyan"
}
}
]
}
85 changes: 85 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,91 @@ If you prefer not to use the entry point, you can run directly:
uv run src/main.py
```

## Development Workflow

Merlin includes automated development workflows using [Just](https://just.systems/) - a command runner that simplifies common tasks.

### Installing Just

**Option 1: Quick Install (Recommended)**
```bash
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ~/.local/bin
```

**Option 2: Package Manager**
```bash
# On macOS with Homebrew
brew install just

# On Ubuntu/Debian
wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [arch=all,amd64,arm64,armhf signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
sudo apt update
sudo apt install just

# On Windows with Chocolatey
choco install just

# On Windows with Scoop
scoop install just
```

### Available Commands

Run `just --list` to see all available commands:

- **`just pr_prep_patch`** - Prepare PR with patch version bump (bug fixes, small changes)
- **`just pr_prep_minor`** - Prepare PR with minor version bump (new features, backward compatible)
- **`just pr_prep_major`** - Prepare PR with major version bump (breaking changes)

### What Each Command Does

Each PR preparation command performs a complete automated workflow:

1. **Git Sync**: Fetch, checkout main, pull latest, merge to current branch
2. **Code Quality**: Format code with `ruff format` and fix issues with `ruff check --fix`
3. **Dependencies**: Update lock file with `uv lock -U`
4. **Versioning**: Bump version (patch/minor/major) and build project
5. **Commit**: Stage all changes and commit with automated message

### Usage Examples

**Terminal Usage:**
```bash
# For bug fixes and documentation updates
just pr_prep_patch

# For new features that don't break existing functionality
just pr_prep_minor

# For breaking changes or major rewrites
just pr_prep_major
```

**VS Code Integration:**

The project includes VS Code tasks for easy access to Just commands:

1. **Command Palette** (`Ctrl+Shift+P` or `Cmd+Shift+P`):
- Type "Tasks: Run Task"
- Select from available tasks:
- `PR Prep: Patch` (🟢 Green icon)
- `PR Prep: Minor` (🔵 Blue icon)
- `PR Prep: Major` (🔴 Red icon)
- `Code Quality: Format & Lint`
- `Dependencies: Update Lock`

2. **Quick Access** (`Ctrl+Shift+P`):
- Type "Tasks: Run Build Task" for default formatting task

3. **Terminal Menu**: Go to **Terminal** → **Run Task...**

**Task Features:**
- 🎯 **Auto-focus**: Tasks automatically switch to terminal when running
- 🎨 **Color-coded**: Green for patch, blue for minor, red for major changes
- 📝 **Descriptive**: Each task shows what it does in the picker
- 🔗 **Integrated**: Seamless workflow between VS Code and terminal

### Configuration

Merlin uses a two-tier configuration system to separate application settings from personal user settings.
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "Merlin"
version = "1.2.2"
version = "1.2.3"
description = "Merlin - Your AI Assistant with multi-agent architecture"
readme = "README.md"
requires-python = ">=3.14"
Expand All @@ -18,6 +18,7 @@ dependencies = [
"urllib3>=2.0.0",
"retry-requests>=2.0.0",
"python-dotenv>=1.1.1",
"python-dateutil>=2.9.0.post0",
]

[project.scripts]
Expand Down
25 changes: 24 additions & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.