Skip to content

Commit 109b946

Browse files
authored
Merge pull request #4 from kagenti/orchestrate/precommit
Add pre-commit hooks and code quality baseline
2 parents e301be6 + 9728d23 commit 109b946

12 files changed

Lines changed: 312 additions & 195 deletions

File tree

.claude/settings.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(git status:*)",
5+
"Bash(git log:*)",
6+
"Bash(git diff:*)",
7+
"Bash(git branch:*)",
8+
"Bash(ls:*)",
9+
"Bash(cat:*)",
10+
"Bash(find:*)",
11+
"Bash(make lint:*)",
12+
"Bash(make fmt:*)",
13+
"Bash(pre-commit run:*)",
14+
"Bash(cd appworld_a2a_runner && pytest:*)",
15+
"Bash(ruff:*)"
16+
]
17+
}
18+
}

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
10+
- repo: https://github.com/astral-sh/ruff-pre-commit
11+
rev: v0.11.2
12+
hooks:
13+
- id: ruff
14+
args: [--fix]
15+
- id: ruff-format

CLAUDE.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Kagenti Workload Harness
2+
3+
## Overview
4+
5+
Workload harnesses for driving test and evaluation traffic to Kagenti agents.
6+
Currently includes the AppWorld harness as the first supported workload driver,
7+
designed to expand to additional drivers over time.
8+
9+
## Repository Structure
10+
11+
```
12+
workload-harness/
13+
├── appworld_a2a_runner/ # AppWorld A2A workload driver
14+
│ ├── appworld_a2a_runner/ # Python package
15+
│ │ ├── runner.py # Main runner entrypoint
16+
│ │ ├── config.py # Configuration
17+
│ │ ├── a2a_client.py # A2A protocol client
18+
│ │ ├── appworld_adapter.py # AppWorld integration
19+
│ │ ├── prompt.py # Prompt handling
20+
│ │ └── otel.py # OpenTelemetry instrumentation
21+
│ └── pyproject.toml # Package dependencies
22+
├── pyproject.toml # Root lint config (ruff)
23+
└── example.env # Environment variable template
24+
```
25+
26+
## Key Commands
27+
28+
| Task | Command |
29+
|------|---------|
30+
| Lint | `make lint` |
31+
| Format | `make fmt` |
32+
| Test | `cd appworld_a2a_runner && pytest` |
33+
| Run | `appworld-a2a-runner` (after install) |
34+
| Install | `cd appworld_a2a_runner && pip install -e .` |
35+
36+
## Code Style
37+
38+
- Python 3.11+ with ruff (lint + format)
39+
- Pre-commit hooks: `pre-commit install`
40+
- Line length: 120
41+
42+
## DCO Sign-Off
43+
44+
All commits must include a `Signed-off-by` trailer:
45+
46+
```sh
47+
git commit -s -m "feat: add new feature"
48+
```
49+
50+
## Commit Attribution
51+
52+
Use `Assisted-By` for AI attribution (not `Co-Authored-By`):
53+
54+
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.PHONY: lint fmt
2+
3+
lint:
4+
pre-commit run --all-files
5+
6+
fmt:
7+
ruff format .
8+
ruff check --fix .

appworld_a2a_runner/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ Thumbs.db
135135

136136
# Project specific
137137
results.jsonl
138-
*.log
138+
*.log

0 commit comments

Comments
 (0)