Skip to main content Switch to mobile version swerepo 0.2.0 Set up a repository the way an AI-assisted team should work, and keep it that way.
pip install swerepo==0.2.0 Copy PIP instructions
Set up a repository the way an AI-assisted team should work, and keep it that way.
SWERepo brings a new or existing Python repository on GitHub up to one engineering standard, and keeps it there:
CI with a single required check;
branch rules with code review;
decision records and a progress log;
instructions every AI coding agent reads;
rules you approve, locked with tests through SeamSpec.
It shows its plan before it changes anything, never overwrites your own work, and changes GitHub only after you say yes.
Status: 0.2.0, Alpha. The standard may still change before 1.0. The full design is in SWEREPO-SPEC.md.
SWERepo is an independent project. It is not part of, or endorsed by, SWE-agent, SWE-bench or Open SWE.
Branch rules: solo and team
Locked rules with SeamSpec
Checking a repository
What SWERepo never does
uv tool install swerepo uv tool install seamspec==0.1.2 # optional: for locked rules Quickstart
In your repository, in a terminal:
swerepo check # what the repository meets, misses or has changed; reads only swerepo init # set it up: shows the plan, asks, then writes swerepo update # later: bring what SWERepo wrote up to the current standard init and update print their plan first; --dry-run prints it and stops. Without a terminal, init and update apply only with --yes, and change GitHub only with --yes --apply-github.
An existing repository
swerepo init │ ├─ a new branch: swerepo-setup, from your freshly fetched default branch ├─ a few questions: editors, security contact, mode, code owner, SeamSpec, test files with fake keys ├─ the plan: every file it creates, every block it adds, every GitHub change │ ├─ your yes ──► files written on swerepo-setup (yours kept: SWERepo only adds) ├─ GitHub, each change asked first: │ merge settings ............................ applied now │ Dependabot alerts, then security updates .. applied now │ branch ruleset ............................ waits: it needs swerepo-ci.yml on main ├─ SeamSpec set up; four hygiene rules proposed for your review │ └─ What's left: 1. commit on swerepo-setup 2. one ready command: push, and open the pull request (title and description filled in: gh asks nothing) ───────── merge the pull request once CI is green ───────── 3. swerepo init --only github ► the branch ruleset, now that CI is on main Why the ruleset waits: it requires the ci-ok check. Applied before swerepo-ci.yml is on the default branch, it would block every pull request, the setup pull request included. Merge settings and Dependabot can't block anything, so they come in the first run; with Dependabot alerts on, the dependency graph is on too, so CI's dependency review passes on the setup pull request.
swerepo init (no commits yet, maybe no GitHub repository) ├─ files written on your default branch └─ What's left: 1. commit them on main: the one commit that goes straight to it 2. gh repo create --source . --push (or git push, to an empty repository) 3. swerepo init --only github ► branch ruleset, merge settings, Dependabot What it sets up
Six components. Each is optional: --only ci,github picks some, --no-seamspec leaves one out.
Your own files are never replaced: where one exists, SWERepo adds its block at the end (for example, in AGENTS.md or .gitignore), or keeps it and says so. The one edit inside a file of yours: where SeamSpec is set up, .seamspec is added to your own ruff settings' extend-exclude, so ruff never touches locked tests.
Copilot's review needs GitHub Copilot code review on your account or organisation. init looks for signs of it on GitHub (Copilot's rules, its settings, or its reviews on recent pull requests) and, in a terminal, asks with what it found as the default; --copilot-review or --no-copilot-review decides without asking. Without Copilot's review, the ruleset leaves it out (in solo, the thread rule too), and CI doesn't wait for a review that would never come. Otherwise, once the ruleset is applied, CI's copilot-review job waits up to 20 minutes on every pull request and then fails, saying whether Copilot was asked at all. --copilot-review-on-push or --no-copilot-review-on-push chooses whether Copilot reviews every push. Where Copilot's review depends on each person's own licence or credits, answer no: a pull request whose author has none left would wait 20 minutes and fail.
Protected develop and release branches: --protected-branches develop,release protects them beside the default branch. Feature branches start from develop and are squash-merged into it; develop is merged into release with a merge commit (a second ruleset, swerepo-release, allows merge commits only). Every workflow runs on pushes to each of them, and each ruleset is applied once swerepo-ci.yml has reached its branches.
The default follows who owns the repository: solo for a personal account, team for an organisation (--mode changes it). Merged branches are kept or deleted as your repository already does. Rulesets need a public repository, or a paid plan for a private one; check says so when they can't be enforced.
SWERepo proposes a rule (or you, or your agent) e.g. "no personal email addresses in tracked files" │ each rule is a plain sentence plus a test ▼ seamspec review you read the rule and its test, and approve or reject it: only a person approves │ ▼ locked the test runs when an agent finishes, before every commit, and in CI │ ├─ a change breaks it ──► the commit or the pull request is stopped └─ the rule must change ──► a supersede, which you approve the same way │ seamspec spec --out docs/EARNED_SPEC.md the readable list of what is locked After approving rules, refresh the earned spec before committing; CI checks it's current. SWERepo's "What's left" and check both say so.
swerepo update ├─ files SWERepo wrote and nobody changed ........ rewritten to the current templates ├─ files you edited .............................. three-way merge, shown first, applied after your yes ├─ a conflict, or an earlier version it can't rebuild ... left alone, and reported └─ never deletes a file, never touches one SWERepo didn't write swerepo diff what update would change in the files you edited swerepo status the components set up, the mode, and each file's state Like init, update ends with one ready command for its pull request, on a branch of your own.
swerepo check reports, per component, what a repository meets (✓), misses (✗), has changed (~) or could update (↑), and ends with what to do next. It only reads: no file is written, and GitHub is read only through gh, with GET requests.
swerepo check # on your machine: files, and GitHub's live settings against the committed ones swerepo check --json # the same, for scripts and agents swerepo check --ci # in GitHub Actions: annotations, no GitHub API calls swerepo check --base main # the pull-request rules: a progress entry; an ADR for a new dependency or a workflow change In repositories set up with a released SWERepo, CI's governance job runs swerepo check --ci on each pull request.
commit, push, merge, or open a pull request for you: it gives you the commands;
change GitHub without your yes in a terminal, or --yes --apply-github;
replace or delete a file of yours;
approve a locked rule, or answer another tool's consent question for you;
install a tool or change your project's dependencies;
repeat a secret, an email address or a path it found: findings name the file and line only.
swerepo
git clone https://github.com/swerepo/swerepo.git && cd swerepo uv sync uv run pytest && uv run ruff check . && uv run ruff format --check . && uv run seamspec verify --all SWERepo follows the standard it installs: branches and pull requests, an ADR for each decision, a progress entry for each change, and locked rules. See CONTRIBUTING.md.
Released: Dec 5, 2026
Both files in this release have provenance metadata.
View provenance details
Apache-2.0 View SPDX License List
ai coding-agents repository ci adr governance
Development Status 3 - Alpha
Intended Audience Developers
Operating System MacOS
Programming Language Python :: 3
Topic Software Development :: Quality Assurance
Release files for swerepo 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 474.4 kB
Release files / swerepo-0.2.0.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Release files / swerepo-0.2.0-py3-none-any.whl
Security for swerepo 0.2.0
Both files in this release have been uploaded with provenance metadata.
With provenance swerepo-0.2.0.tar.gz Dec 5, 2026
With provenance swerepo-0.2.0-py3-none-any.whl Dec 5, 2026
Attestation for swerepo-0.2.0.tar.gz
Attestation for swerepo-0.2.0-py3-none-any.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 5, 2026 2 release files Full provenance
Dec 4, 2026 2 release files Full provenance
Nov 20, 2026 2 release files No provenance
Yanked reason: placeholder; use 0.1.0 or later"
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 4d99e05











