docs/dev/swarm-ops.md
Operating manual for subagents executing tasks from
modernization-plan.md. Read this once before
your first task; refer back as needed.
Modernization work is coordinated on the long-lived branch
maintenance/code-cleanup-2026-05, cut from main. The default workflow
is: commit directly to the working branch. Per-initiative feature
branches off the working branch are allowed when (and only when) a task
description explicitly says so.
Agents never:
mainBefore every commit:
python -m pytest tests/unit -x — must exit 0. Skipped tests (Windows-only,
etc.) are fine; failures are not.ruff check pipenv/ — must exit 0. This is the project's linter and is
also enforced by pre-commit hooks.print(, logger., raise , and
sys.exit( and call those out in the commit body so a reviewer can
verify intent.Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>.Do not modify any of:
pipenv/patched/ — vendored pip; managed by separate tooling.pipenv/vendor/ — vendored third-party packages; managed by separate
tooling.pipenv/__version__.py — release tooling owns this.CHANGELOG.md — Towncrier generates this from news/ fragments at
release time.Pipfile.lock.Match the prefixes already in use. Verify with git log --oneline -20.
Common ones in this repo: refactor:, chore:, chore(deps):,
docs:, docs(dev):, fix:, feat:, test:, perf:, vendor:.
Rules:
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>.pipenv uses Towncrier; fragments live in news/. Configured types include
feature, behavior, bugfix, vendor, doc, trivial, removal
(see [tool.towncrier] in pyproject.toml).
Rules of thumb:
news/ (e.g.
+cool-down-period.feature.rst, <issue>.bugfix.rst). Inspect the
directory and copy the pattern.news/, a fragment is required.When a task surfaces a side concern that a reviewer should see but isn't
blocking the current task, leave an inline comment tagged
TODO(swarm): ... in the code. These are greppable; the reviewer can
sweep them with rg "TODO\(swarm\)" at the end of the wave.
A task is complete when all of the following hold:
docs/dev/modernization-plan.md has been updated:
status set to Completed, log filled in with a 2–3 line summary,
and files edited/created populated.The plan-file update is a separate commit from the task work itself,
typically with a chore(plan): mark <task-id> complete subject.