Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug Report
about: Report a bug or unexpected behavior
title: "[Bug] "
labels: bug
assignees: ""
---

## Description

<!-- A clear description of the bug -->

## Steps to Reproduce

1.
2.
3.

## Expected Behavior

<!-- What you expected to happen -->

## Actual Behavior

<!-- What actually happened -->

## Environment

- OS:
- Node/Bun version:
- ralph-wiggum-cli version:
- AI agent used (claude/amp/droid/etc):

## Additional Context

<!-- Any other relevant information, logs, or screenshots -->
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature Request
about: Suggest a new feature or enhancement
title: "[Feature] "
labels: enhancement
assignees: ""
---

## Problem

<!-- What problem does this feature solve? -->

## Proposed Solution

<!-- Describe your proposed solution -->

## Alternatives Considered

<!-- Any alternative solutions you've considered -->

## Additional Context

<!-- Any other relevant information -->
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Description

<!-- Briefly describe what this PR does -->

## Type of Change

- [ ] `feat`: New feature
- [ ] `fix`: Bug fix
- [ ] `chore`: Maintenance/refactoring
- [ ] `docs`: Documentation only

## Checklist

- [ ] I have tested my changes locally
- [ ] My code follows the project's coding style
- [ ] I have updated documentation if needed
- [ ] My commit messages follow [Conventional Commits](https://www.conventionalcommits.org/)

## Related Issues

<!-- Link any related issues: Fixes #123, Closes #456 -->
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [main]
branches: [main, dev]
pull_request:
branches: [main]
branches: [main, dev]

jobs:
build:
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Create Release PR

on:
workflow_dispatch:
inputs:
title:
description: "Release title (optional)"
required: false
default: ""

permissions:
contents: read
pull-requests: write

jobs:
create-release-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get version from package.json
id: version
run: echo "current=$(jq -r .version package.json)" >> $GITHUB_OUTPUT

- name: Generate changelog preview
id: changelog
run: |
echo "## Changes since last release" > /tmp/changelog.md
echo "" >> /tmp/changelog.md
git log main..dev --pretty=format:"- %s" >> /tmp/changelog.md || echo "- No new commits" >> /tmp/changelog.md

- name: Create Pull Request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TITLE="${{ github.event.inputs.title }}"
if [ -z "$TITLE" ]; then
TITLE="Release: dev → main"
fi

BODY=$(cat <<EOF
## Release PR

Merging \`dev\` into \`main\` will trigger semantic-release to:
- Analyze commits and determine version bump
- Update CHANGELOG.md
- Publish to npm
- Create GitHub release

**Current version:** ${{ steps.version.outputs.current }}

$(cat /tmp/changelog.md)
EOF
)

gh pr create \
--base main \
--head dev \
--title "$TITLE" \
--body "$BODY"
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
branches: [main]

permissions:
contents: write
issues: write
pull-requests: write
id-token: write

jobs:
release:
runs-on: ubuntu-latest
if: github.repository == 'yemyat/ralph-cli'

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- uses: actions/setup-node@v4
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: bun install

- name: Build
run: bun run build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
17 changes: 17 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
94 changes: 94 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Contributing to Ralph CLI

Thanks for your interest in contributing!

## Development Setup

```bash
# Clone the repo
git clone https://github.com/yemyat/ralph-cli.git
cd ralph-cli

# Install dependencies
bun install

# Run in development mode
bun run dev

# Link globally for testing
bun link
```

## Commit Convention

This project uses [Conventional Commits](https://www.conventionalcommits.org/). All commits must follow this format:

```
<type>: <description>
```

**Types:**
- `feat:` - New feature (triggers minor version bump)
- `fix:` - Bug fix (triggers patch version bump)
- `chore:` - Maintenance, refactoring, dependencies

**Breaking changes:** Add `!` after type (e.g., `feat!:`) or include `BREAKING CHANGE:` in the commit body. This triggers a major version bump.

Commits are enforced via commitlint + husky.

## Git Workflow

```
feature branch → PR to dev → merge to dev
(when ready to release)
dev → PR to main → merge to main
semantic-release runs
(version bump + npm publish)
```

### Branch Strategy

- **`main`** - Production branch. Merges trigger releases.
- **`dev`** - Development branch. All feature PRs target this branch.
- **Feature branches** - Create from `dev`, name like `feat/my-feature` or `fix/my-fix`.

## Pull Request Process

1. Fork the repo and create your branch from `dev`
2. Make your changes
3. Ensure all checks pass: `bun run lint && bun run typecheck`
4. Submit a PR to `dev` branch
5. PRs are squash-merged to keep history clean

### Creating a Release

Maintainers can trigger a release by:
1. Go to **Actions** → **Create Release PR**
2. Click **Run workflow**
3. Merge the generated PR from `dev` → `main`

## Code Style

- TypeScript with strict mode
- Use `bun` runtime
- Minimal comments, prefer self-documenting code
- Follow existing patterns in the codebase

## Adding a New AI Agent

See [AGENTS.md](./AGENTS.md#adding-a-new-agent) for instructions.

## Releases

Releases are automated via semantic-release. When PRs are merged to `main`:
- Version is auto-bumped based on commit types
- CHANGELOG.md is updated
- Package is published to npm
- GitHub release is created

## Questions?

Open an issue or start a discussion.
Loading