Skip to content

Commit c4241b5

Browse files
shreyas-lyzrclaude
andcommitted
Add README, logo, CI, templates, and community files
- README with badges, quick start, SDK docs, architecture - GitClaw logo - MIT LICENSE - CONTRIBUTING.md with Rust-specific guidelines - CODE_OF_CONDUCT.md (Contributor Covenant) - SECURITY.md with vulnerability reporting policy - CHANGELOG.md - GitHub Actions CI (build, test, clippy, format on Linux + macOS) - GitHub Actions Release (cross-compile for linux/macOS amd64/arm64) - Issue templates (bug report, feature request) - Pull request template Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f74e544 commit c4241b5

13 files changed

Lines changed: 911 additions & 0 deletions

File tree

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Bug Report
2+
description: Report something that's broken
3+
labels: ["bug"]
4+
body:
5+
- type: textarea
6+
id: description
7+
attributes:
8+
label: What happened?
9+
description: Be specific. Include error messages if any.
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: repro
15+
attributes:
16+
label: Steps to reproduce
17+
description: Minimal steps to trigger the bug.
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: expected
23+
attributes:
24+
label: Expected behavior
25+
validations:
26+
required: false
27+
28+
- type: input
29+
id: version
30+
attributes:
31+
label: Version
32+
description: "Output of `gitclaw --version` or git commit hash"
33+
validations:
34+
required: false
35+
36+
- type: input
37+
id: environment
38+
attributes:
39+
label: Environment
40+
description: "OS, Rust version (rustc --version)"
41+
validations:
42+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Questions
4+
url: https://github.com/open-gitagent/rusty-gitclaw/discussions
5+
about: Ask questions in Discussions instead of opening an issue

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement
3+
labels: ["enhancement"]
4+
body:
5+
- type: textarea
6+
id: what
7+
attributes:
8+
label: What do you want?
9+
description: Describe the feature concisely.
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: why
15+
attributes:
16+
label: Why?
17+
description: What problem does this solve? What's your use case?
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: how
23+
attributes:
24+
label: Proposed solution (optional)
25+
description: Brief technical approach if you have one in mind.
26+
validations:
27+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Summary
2+
3+
<!-- What does this PR do? Keep it to 1-3 bullet points. -->
4+
5+
## Changes
6+
7+
<!-- List the key files changed and why. -->
8+
9+
## Testing
10+
11+
- [ ] `cargo build --workspace` passes
12+
- [ ] `cargo test --workspace` passes
13+
- [ ] `cargo clippy --workspace` has no new warnings
14+
- [ ] Tested manually with a real agent (if applicable)
15+
16+
## Related Issues
17+
18+
<!-- Link any related issues: Fixes #123, Closes #456 -->

.github/workflows/ci.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
name: Build & Test
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, macos-latest]
19+
rust: [stable]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Install Rust
25+
uses: dtolnay/rust-toolchain@stable
26+
with:
27+
components: clippy
28+
29+
- name: Cache cargo
30+
uses: actions/cache@v4
31+
with:
32+
path: |
33+
~/.cargo/bin/
34+
~/.cargo/registry/index/
35+
~/.cargo/registry/cache/
36+
~/.cargo/git/db/
37+
target/
38+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
39+
40+
- name: Build
41+
run: cargo build --workspace
42+
43+
- name: Test
44+
run: cargo test --workspace
45+
46+
- name: Clippy
47+
run: cargo clippy --workspace -- -D warnings
48+
49+
format:
50+
name: Format Check
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
- uses: dtolnay/rust-toolchain@stable
55+
with:
56+
components: rustfmt
57+
- run: cargo fmt --all -- --check
58+
59+
release-size:
60+
name: Binary Size Check
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v4
64+
- uses: dtolnay/rust-toolchain@stable
65+
- name: Build release
66+
run: cargo build --release
67+
- name: Check binary size
68+
run: |
69+
SIZE=$(stat -c%s target/release/gitclaw 2>/dev/null || stat -f%z target/release/gitclaw)
70+
echo "Binary size: $(numfmt --to=iec-i --suffix=B $SIZE 2>/dev/null || echo "${SIZE} bytes")"
71+
if [ "$SIZE" -gt 26214400 ]; then
72+
echo "::warning::Binary exceeds 25MB"
73+
fi

.github/workflows/release.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
name: Build ${{ matrix.target }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
include:
18+
- os: ubuntu-latest
19+
target: x86_64-unknown-linux-gnu
20+
artifact: gitclaw-linux-amd64
21+
- os: ubuntu-latest
22+
target: aarch64-unknown-linux-gnu
23+
artifact: gitclaw-linux-arm64
24+
- os: macos-latest
25+
target: x86_64-apple-darwin
26+
artifact: gitclaw-macos-amd64
27+
- os: macos-latest
28+
target: aarch64-apple-darwin
29+
artifact: gitclaw-macos-arm64
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- name: Install Rust
35+
uses: dtolnay/rust-toolchain@stable
36+
with:
37+
targets: ${{ matrix.target }}
38+
39+
- name: Install cross-compilation tools
40+
if: matrix.target == 'aarch64-unknown-linux-gnu'
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y gcc-aarch64-linux-gnu
44+
45+
- name: Build
46+
run: cargo build --release --target ${{ matrix.target }}
47+
env:
48+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
49+
50+
- name: Package
51+
run: |
52+
cd target/${{ matrix.target }}/release
53+
tar czf ../../../${{ matrix.artifact }}.tar.gz gitclaw
54+
cd ../../..
55+
56+
- name: Upload artifact
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: ${{ matrix.artifact }}
60+
path: ${{ matrix.artifact }}.tar.gz
61+
62+
release:
63+
name: Create Release
64+
needs: build
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- name: Download artifacts
70+
uses: actions/download-artifact@v4
71+
72+
- name: Create release
73+
uses: softprops/action-gh-release@v2
74+
with:
75+
generate_release_notes: true
76+
files: |
77+
gitclaw-linux-amd64/gitclaw-linux-amd64.tar.gz
78+
gitclaw-linux-arm64/gitclaw-linux-arm64.tar.gz
79+
gitclaw-macos-amd64/gitclaw-macos-amd64.tar.gz
80+
gitclaw-macos-arm64/gitclaw-macos-arm64.tar.gz

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## [0.1.0] - 2025-03-04
6+
7+
### Added
8+
9+
- Initial Rust port of [GitClaw](https://github.com/open-gitagent/gitclaw)
10+
- **pi-ai crate**: LLM provider abstraction with streaming support
11+
- Anthropic Messages API (Claude)
12+
- OpenAI Chat Completions (GPT-4o, o1, o3)
13+
- Google Generative AI (Gemini)
14+
- Built-in registry of 383 models across 8 providers
15+
- SSE streaming with event mapping
16+
- JSON Schema validation for tool arguments
17+
- **pi-agent-core crate**: Agent loop engine
18+
- Stream response -> execute tool calls -> loop pattern
19+
- Broadcast event system for subscribers
20+
- CancellationToken-based abort support
21+
- **gitclaw crate**: Full CLI + SDK
22+
- Interactive REPL with rustyline
23+
- Single-shot mode (`--prompt`)
24+
- Local repo mode (`--repo` with auto clone/branch/push)
25+
- Voice mode (`--voice`) with OpenAI Realtime WebSocket
26+
- Built-in tools: cli, read, write, memory
27+
- Declarative YAML tool definitions
28+
- Skills, workflows, knowledge, examples discovery
29+
- Script-based lifecycle hooks
30+
- Compliance validation and JSONL audit logging
31+
- Environment config with YAML deep merge
32+
- Agent inheritance and scaffolding
33+
- Single 12MB static binary with zero runtime dependencies
34+
- Full compatibility with TypeScript GitClaw agent repos

CODE_OF_CONDUCT.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement
40+
41+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
42+
reported to the project maintainers. All complaints will be reviewed and
43+
investigated promptly and fairly.
44+
45+
## Attribution
46+
47+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
48+
version 2.0, available at
49+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

0 commit comments

Comments
 (0)