| name | quality-gate |
| description | Orchestrates the QUALITY pipeline stage for egregore work items, running code review, unbloat, and test updates. Use when running quality checks before a PR. |
| alwaysApply | false |
| category | orchestration |
| tags | ["egregore","quality","review","conventions"] |
| tools | [] |
| complexity | intermediate |
| model_hint | standard |
| estimated_tokens | 300 |
Quality Gate
When To Use
- Running quality checks on egregore work items
- Self-review before creating a PR
- Reviewing another agent's PR in PR-review mode
When NOT To Use
- Manual code reviews outside egregore pipeline
- One-off lint or format checks (use
make lint directly)
Orchestrate the QUALITY stage of egregore's pipeline.
Each quality step runs convention checks from the codex
and invokes mapped skills.
Routing Table
| Step | Conventions | Skills | Modes |
|---|
| code-review | C1,C2,C3,C4,C5 | pensive:unified-review | self, pr |
| unbloat | - | conserve:unbloat | self |
| code-refinement | - | pensive:code-refinement | self |
| update-tests | - | sanctum:update-tests | self |
| update-docs | C5 | sanctum:update-docs, scribe:slop-detector | self |
Inputs
The orchestrator invokes this skill with:
- step: which quality step to run (e.g. "code-review")
- mode: "self-review" or "pr-review"
- work_item_id: the manifest work item ID
- branch: the git branch with changes
- pr_number: (PR-review mode only) the PR number
Self-Review Workflow
When mode is "self-review":
- Get changed files:
git diff --name-only main...HEAD
- Load conventions from
conventions/codex.yml
- Filter conventions to those mapped to the current step
- Run convention checks via
conventions.py
- Invoke mapped skills on the changed files
- Collect all findings
- Calculate verdict
Auto-Fix Loop
If blocking findings exist:
- Attempt to fix each finding (skill-dependent)
- Commit fixes to the work item branch
- Re-run convention checks
- If still blocking after 3 attempts, verdict is
"fix-required"
Verdict Calculation