17 lines
1.2 KiB
Python
17 lines
1.2 KiB
Python
"""The passes of larv-review, as skills/larv-review/SKILL.md → "Passes" lists them."""
|
|
import typing
|
|
|
|
# A pass an agent under agents/ reviews, in lower case. A Literal cannot be built from `PASS_AGENTS`, so test_review_passes holds the two together.
|
|
ReviewedPass = typing.Literal["architecture", "principles", "overrides", "stability", "product-owner", "prose"]
|
|
# Each pass in the order of SKILL.md's pass table, and the agent under agents/ that reviews it; None where a skill or plugin does. The auto-reviewer is left out: larv-review counts its rounds from its reviews on the PR, not from commit titles.
|
|
PASS_AGENTS: dict[str, str | None] = {"architecture": "systems-architect", "principles": "principles-auditor", "full scan": None, "security": None, "overrides": "override-reviewer", "stability": "stability-reviewer", "product-owner": "product-owner-reviewer", "prose": "prose-reviewer"}
|
|
PASSES = tuple(PASS_AGENTS)
|
|
|
|
|
|
def _reviewed(name: str) -> typing.TypeGuard[ReviewedPass]:
|
|
return name in typing.get_args(ReviewedPass)
|
|
|
|
|
|
# The passes that have an agent. A pass missing from `ReviewedPass` drops out of it, which test_review_passes fails on.
|
|
REVIEWERS: dict[ReviewedPass, str] = {name: agent for name, agent in PASS_AGENTS.items() if agent and _reviewed(name)}
|