Title#
Add pre-PR quality gate and /agent skip-quality-gate directive
Problem#
Agent-created PRs lacked automated quality checks before opening, risking lint failures, test regressions, or merge conflicts landing in review. There was also no way to bypass checks for known-good emergency changes.
Task / Link#
Closes #228
Changes#
- Add
skip-quality-gatetoALLOWED_DIRECTIVESandVALID_DIRECTIVES; directive sets a one-time override flag on the task and posts a confirmation comment without re-dispatching - Add
qualityGateOverrideboolean column (defaultfalse) toTaskEntity - Add
setQualityGateOverridemethod toTaskStateService - Pass
QUALITY_GATE_OVERRIDE=1env var to the deliver phase invocation when override is set; reset flag atomically before phase starts (one-time use) - Create
scripts/tools/pre-pr-gate.sh— runs lint, tests, and merge conflict check; emits a structured markdown table; accepts--skipfor override mode; exits non-zero on failure
Notes#
.claude/skills/deliver-implementation/SKILL.mdand.claude/skills/implement-code/pr-description-standard.mdare planned changes (integratepre-pr-gate.shinto deliver flow, add Quality Checks section to PR description standard) but were blocked by the permissions system during this run. Those skill files require a follow-up edit with appropriate permissions.- The
qualityGateOverridecolumn uses a SQLite default (false), so existing in-flight tasks are unaffected without a migration.
Quality Checks#
| Check | Status |
|---|---|
| Lint | ✅ passed |
| Tests | ✅ passed (638 total) |
| Merge conflicts | ✅ none |
Testing#
npm run lint— 0 errors (4 pre-existing warnings in unrelated file)npm run test— all 638 tests pass including 3 new quality gate override tests inphase-router.service.spec.tsand 2 new tests indirective.service.spec.ts