5.3 KiB
Deverenz
Self-hosted, platform-independent suite of project management measures with opinionated defaults, powered by any OpenAI-compatible LLM. The MVP covers a PR's life cycle. The key output: what the ticket asked for vs. what the PR actually does, recorded on the ticket.
- Open:
deverenz pr create(CLI, developer's own token) writes title and description from the local diff and the linked issue, then opens the PR via the Gitea API. - Update: on each push, the server rewrites the Deverenz block in the PR description.
- Merge: the server posts a delivery summary with a machine-readable record on the ticket (implemented / deviates / missing / unclear, plus ticket quality) and links it from the PR. It closes the ticket and moves it to Done if the delivery is clean, otherwise leaves it open for a PO decision.
Deverenz ships as a CLI plus a single container. The git host and the LLM are external services reached over HTTP. Never bundle Gitea, Ollama or a model.
MVP: Gitea only (Forgejo should work unchanged), issue number taken from the branch name, config via env vars only. No database, no web UI, no other forges yet.
Where to look
docs/architecture.md: the three stages in detail, Done gate, ticket checks, models, marked content and record block, modules, env vars, Gitea endpoints (incl. project boards), webhook rules, deployment, licensing. Read the relevant section before changing a module.docs/vision.md: why the product exists, agile stance, principles, future ideas. Not for implementation detail.docs/roadmap.md: milestone overview with links to the issues. Task status lives on the Gitea board, not in this file.docs/conventions.md: branch names, commit messages, issue titles. Follow it for every branch and commit.docs/agentic-workflow.md: how the project is managed and worked: tickets and board on Gitea, pipeline per ticket, verification rules, review checklist, current autonomy phase. Follow it for every ticket; change it only with the developer's OK.docs/devlog.md: one entry per finished ticket (time, cost, agent mistakes and what caught them). Draft the entry when a step is done.
Stack
Python 3.12+ with uv · FastAPI + uvicorn · async httpx · Pydantic + pydantic-settings · openai SDK with configurable base_url · pytest + respx · ruff · pyright (strict) · Gitea Actions for CI · Docker image with only Deverenz in it.
Commands
git config core.hooksPath .githooks # once after cloning: enforces commit conventions
uv sync
uv run pytest
uv run ruff check --fix . && uv run ruff format .
uv run pyright
.claude/scripts/gitea.sh GET '/repos/<owner>/<repo>/issues?state=open' # project management API
uv run deverenz pr create --dry-run # preview generated PR title/body
uv run deverenz merged owner/repo 1 --dry-run # preview merge report
docker compose up -d # deverenz only; reads .env
docker compose logs -f deverenz
Project structure
src/deverenz/ config.py main.py webhook.py gitea.py board.py git_local.py
checks.py diff_filter.py summarize.py render.py cli.py
tests/fixtures/ stored Gitea webhook payloads and API responses
docs/ architecture.md, vision.md, roadmap.md, conventions.md,
agentic-workflow.md, devlog.md
Conventions
- Async throughout (
httpx.AsyncClient, async FastAPI handlers). - Type hints everywhere; Pydantic models only for fields we actually use, not the full Gitea API.
- Keep it small. Gitea client sits behind a small
Forgeprotocol; no plugin framework, no abstractions for platforms we don't support yet. - Never log tokens, secrets or full diffs.
- Work flows freely, Done has to be earned: warn during work, never block it; only clean deliveries move to Done automatically, everything else needs a visible human decision.
- Never edit an issue description. In PR bodies, only touch text between the
<!-- deverenz:start/end -->markers. - Generated text is reviewer-friendly: about 150–300 words, bullets over prose.
- Cost control: one LLM call per relevant event, never on every webhook.
- LLM output must work with small local models: plain JSON +
model_validate_json+ one retry, no provider-specific structured output. - Verify Gitea API details against
/api/swaggerof the running instance and real payloads, not memory.
Workflow rules
- Work on one ticket at a time. Plan first when a change touches more than one module.
- Managing this project on Gitea (tickets, board, PRs) is separate from the Deverenz product: never run Deverenz against its own repo. Draft tickets for approval before creating them.
- Before calling a task done:
uv run pytest,uv run ruff check .anduv run pyrightpass. - The developer knows Java/TypeScript, not Python: explain Python constructs only where they differ, mapped to their Java/TypeScript counterparts.
- Never read, print or commit
.env. Use.env.examplefor documenting variables. - Prefer small commits, one per finished ticket. Ask before committing, pushing, opening a PR and merging.
- No Claude attribution (Co-Authored-By, "Generated with Claude Code") in commit messages or PR descriptions.
- Remote is a self-hosted Gitea (not GitHub):
ghdoes not work here. Use.claude/scripts/gitea.shfor issues, labels, milestones, the board and PRs.