Nm Egregore Quality Gate
by @athola
Orchestrates the QUALITY pipeline stage for egregore work items, running code review, unbloat, and test updates
clawhub install nm-egregore-quality-gateπ About This Skill
name: quality-gate description: | Orchestrates egregore's QUALITY pipeline stage. Runs convention checks and invokes review skills for each quality step. Supports self-review (pre-PR) and PR-review (other agents' PRs) modes version: 1.9.4 triggers: - egregore - quality - review - conventions metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/egregore", "emoji": "\ud83e\udd9e"}} source: claude-night-market source_plugin: egregore
> Night Market Skill β ported from claude-night-market/egregore. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
Quality Gate
When To Use
When NOT To 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:
Self-Review Workflow
When mode is "self-review":
1. Get changed files: git diff --name-only main...HEAD
2. Load conventions from conventions/codex.yml
3. Filter conventions to those mapped to the current step
4. Run convention checks via conventions.py
5. Invoke mapped skills on the changed files
6. Collect all findings
7. Calculate verdict
Auto-Fix Loop
If blocking findings exist:
1. Attempt to fix each finding (skill-dependent) 2. Commit fixes to the work item branch 3. Re-run convention checks 4. If still blocking after 3 attempts, verdict is "fix-required"
Verdict Calculation
if no findings:
verdict = "pass"
elif all findings are severity "warning":
verdict = "pass-with-warnings"
elif blocking findings remain after auto-fix:
verdict = "fix-required"
Record verdict in manifest decisions:
{
"step": "code-review",
"chose": "pass-with-warnings",
"why": "2 warnings (C4: noqa in hooks), 0 blocking"
}
PR-Review Workflow
When mode is "pr-review":
1. Fetch PR diff: gh pr diff
2. Load conventions and filter to code-review step
3. Run convention checks on changed files
4. Invoke pensive:unified-review on the diff
5. Collect all findings
Posting Reviews
Map findings to GitHub review:
gh api POST review withComment format per finding:
[egregore:{convention_id}] {message}Convention: {convention_name}
Severity: {severity}
Quality Config
Work items may have a quality_config field:
{
"skip": ["unbloat"],
"only": ["code-review", "update-docs"]
}
skip: list of steps to skip (run all others)only: list of steps to run (skip all others)only takes precedenceConvention Filtering by Step
Not all conventions run on every step. The routing table above defines which conventions apply to which step. The quality gate filters the loaded codex accordingly before running checks.