quality-enforcement

A quality-enforcement toolkit used when preparing commits, opening PRs, or merging, covering code-style checks, type-safety, bundle size budgets, test-coverage thresholds, complexity limits, dependency audits, and dead-code detection.

Last repository push
GitHub Stars
140
Forks
37
Issues / PRs
0

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "quality-enforcement" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-d1fc54abe7c5ea9be994d95595e1865474a83b85e349a9ea012ce14e06a6aa8d. Verify the upstream source and version against https://github.com/NoobyGains/godmode before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

A quality-enforcement toolkit used when preparing commits, opening PRs, or merging, covering code-style checks, type-safety, bundle size budgets, test-coverage thresholds, complexity limits, dependency audits, and dead-code detection.

0 Downloads

Introduction source: third_party · NoobyGains · 0.0.1 Reference

SkillPi interpretation

Tasks
Use when preparing code for commit, PR, or merge - covers linting, type safety, bundle budgets, coverage thresholds, complexity limits, dependency audit, and dead code detection
Audience
Always before:** Committing code Opening a pull request Merging to trunk Releasing to production Especially when:** "Just suppress the linter this once" (never) "CI is too slow, merge manually" (fix CI, do not skip it) "Type errors but it works at runtime" (fix the types) "Coverage dropped but the critical paths are tested" (restore coverage)
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: quality-enforcement
description: Use when preparing code for commit, PR, or merge - covers linting, type safety, bundle budgets, coverage thresholds, complexity limits, dependency audit, and dead code detection

Quality Enforcement

Overview

Quality enforcement is automated, not aspirational. If it can be checked by a machine, it must be.

Core principle: A quality check that is not enforced in CI does not exist.

No exceptions. No workarounds. No shortcuts.

The Prime Directive

NO CODE LANDS WITHOUT ALL QUALITY CHECKS PASSING

If a check fails, fix the code. Never disable the check. Never bypass CI.

When to Use

Always before:

  • Committing code
  • Opening a pull request
  • Merging to trunk
  • Releasing to production

Especially when:

  • "Just suppress the linter this once" (never)
  • "CI is too slow, merge manually" (fix CI, do not skip it)
  • "Type errors but it works at runtime" (fix the types)
  • "Coverage dropped but the critical paths are tested" (restore coverage)

The Entry Protocol

BEFORE any PR or merge:

1. LINT: Zero errors, zero warnings
2. TYPES: Zero type errors (strict mode)
3. TESTS: All passing, coverage meets threshold
4. BUILD: Clean build, no warnings
5. SIZE: Bundle/binary within budget (if applicable)
6. DEPS: No known vulnerabilities (critical/high)
7. COMPLEXITY: No functions exceeding complexity threshold

Any check fails = code is not ready. Fix before advancing.

Quality Check Reference

Check 1: Linting

Standard: Zero errors AND zero warnings
Setting Value Rationale
Errors 0 Non-negotiable
Warnings 0 Warnings become errors you learn to ignore
Config committed Yes Consistent across all contributors
CI enforced Yes Local overrides are irrelevant

Warnings are tomorrow's errors. Either fix them or adjust the rule. Never tolerate warnings.

Disable a rule? Only if the team explicitly agrees the rule is inappropriate for this project. Document the rationale in the config file. Never disable inline for convenience.

Check 2: Type Safety

Standard: Zero type errors, strict mode enabled

TypeScript:

{
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "forceConsistentCasingInFileNames": true
  }
}

Python: mypy or pyright with strict mode.

Anti-Pattern Problem Fix
any type Disables type checking Use specific types or generics
// @ts-ignore Conceals real errors Fix the type error
# type: ignore Same problem Fix the type error
Non-strict mode False sense of safety Enable strict from day one

any is a type error you chose not to resolve. Every any weakens the type system for everything it touches.

Check 3: Test Coverage

Standard: Coverage threshold that never decreases
Metric Floor Target
Line coverage 80% 90%+
Branch coverage 70% 85%+
New code coverage 90% 100% (aspire to)

Coverage thresholds are a ratchet. They increase, never decrease. Configure CI to fail if coverage drops below the current level.

Coverage is necessary but not sufficient. 100% coverage with poor assertions is worse than 70% coverage with rigorous assertions. Coverage checks combine with TDD discipline (godmode:test-first).

Check 4: Build

Standard: Clean build, zero warnings
  • Build must complete successfully
  • Zero compiler/build warnings
  • Output matches expected structure
  • No missing dependencies at build time

Check 5: Bundle Size Budget (Frontend)

Standard: Total bundle size within defined budget
Target Budget Tool
Initial JS (compressed) <200KB webpack-bundle-analyzer
CSS <50KB PurgeCSS check
Images Optimized, WebP/AVIF imagemin
Total page weight <1MB Lighthouse

Set the budget. Enforce in CI. When budget is exceeded, analyze the bundle contents and eliminate or split.

Check 6: Dependency Audit

Standard: Zero critical or high vulnerabilities
Language Command CI Integration
JavaScript npm audit --audit-level=high Fail on high+
Python pip-audit or safety check Fail on high+
Go govulncheck ./... Fail on any
Rust cargo audit Fail on any

Also verify:

  • No unnecessary dependencies (is every dep actually used?)
  • No duplicate dependencies (different versions of same package)
  • Dependencies are maintained (last update within 12 months)

Check 7: Complexity Metrics

Standard: No function exceeds complexity threshold
Metric Threshold Tool
Cyclomatic complexity <10 per function ESLint (complexity rule), radon, gocyclo
Function length <50 lines Linter rules
File length <400 lines Linter rules
Parameters <5 per function Linter rules

When complexity exceeds threshold: Refactor. Extract functions. Simplify conditionals. Never raise the threshold.

Check 8: Dead Code

Standard: No unused exports, variables, or dependencies
What Tool
Unused exports ts-prune, knip
Unused dependencies depcheck, knip
Unused variables Linter (no-unused-vars)
Unreachable code Linter, type checker

Dead code is misleading code. It implies something depends on it. Remove it.

CI Pipeline Template

# Minimum quality enforcement pipeline
quality-checks:
  steps:
    - name: Lint
      run: npm run lint
    - name: Type Check
      run: npm run typecheck
    - name: Test
      run: npm test -- --coverage
    - name: Coverage Check
      run: check-coverage --threshold 80
    - name: Build
      run: npm run build
    - name: Bundle Size
      run: bundlesize
    - name: Audit
      run: npm audit --audit-level=high

All checks run on every PR. All must pass before merge.

Cognitive Traps

Rationalization Truth
"Just a lint warning, not an error" Warnings you ignore become errors you miss.
"Type error but it works at runtime" Types prevent the runtime error you have not encountered yet.
"Coverage dropped 1%, not a big deal" 1% per PR = 50% in a year. Ratchets do not go down.
"Skip CI, I tested locally" Local environments differ from CI. That is why CI exists.
"Bundle grew because we added features" Features should replace or split, not only add.
"Vulnerability is in a dev dependency" Dev deps run in CI. CI has secrets. Still a risk.
"Function is complex but readable" Complexity limits exist because readability is subjective.
"Dead code might be needed later" Git remembers. Delete it. Restore from history if needed.

Guardrails - HALT and Fix

  • Disabling lint rules inline without documented rationale
  • @ts-ignore or # type: ignore without an accompanying issue
  • Coverage threshold lowered in config
  • CI skipped or overridden for merge
  • any types spreading through codebase
  • Bundle size growing without investigation
  • Warnings treated as acceptable
  • Audit failures dismissed because "it's a dev dependency"

All of these mean: The check is broken. Fix the check before writing more code.

Integration

Complements:

  • godmode:test-first — Tests are one check among many
  • godmode:completion-gate — Quality checks are verification evidence
  • godmode:project-bootstrap — Checks configured at project setup
  • godmode:security-protocol — Dependency audit is a security check
  • godmode:performance-tuning — Bundle size is a performance check

The Bottom Line

Every quality check automated in CI. Every check passing before merge. No exceptions.

If a check can be bypassed, it will be bypassed. Make it impossible to bypass.

Version history

  1. v2.1.2 GitHub ↗
    Original release notes

    ### Changed - The repository root holds only what a harness looks for there. The version list moved from `.version-bump.json` to `scripts/version-files.json`; the OpenCode entry point is `.opencode/plugins/godmode.js` directly (`package.json` `main` and `exports`), so the root `index.js` shim is gone. ### Removed - Gemini CLI support (`gemini-extension.json`, `GEMINI.md`, the Gemini tool reference). Google retired Gemini CLI for individual users on 18 June 2026 and moved extensions to Antigravity plugins; GodMode's Antigravity plugin is that route. The manifest had never been verified on a live install.

  2. v2.1.1 GitHub ↗
    Original release notes

    The one-round Codex review of the 2.1.0 diff (`docs/verification/codex-review-2.1.0.md`) found two validator bugs and five wording problems; all are fixed here. ### Fixed - Validator: the 20,000-byte skill cap and the 8,000-byte protocol position are measured in UTF-8 bytes, not UTF-16 characters, and a skill without a `## The Protocol` section now fails instead of slipping past the position check. - `intent-discovery`: the one-question-per-message guardrail names the builder-check round as its single exception, and the flow graph sends a small change straight to approval, as step 9 says. - `tests/acceptance/claude-code-stop-check.sh`: a refusal that quotes the forbidden sentence at the end of the message no longer counts as making the claim. - Changelog and reference wording: an Interfaces block is required only when another task consumes or produces the names; the reviewer agent's tool list is `Read, Grep, Glob, Bash` with writes forbidden by its prose, not "read-only". See the 2.1.0 notes for the features this patch completes.

  3. v2.1.0 GitHub ↗
    Original release notes

    Seven months of Claude Code changes and a pass over nine peer projects, read from their source (research in `docs/research/2026-10-25-claude-code-and-peers-2-1.md`). The theme: rules that must hold every time move from prose into mechanisms the harness enforces, and plans and designs lean on what superpowers 7.0.1 learned the hard way. ### Added - `completion-gate` arms a one-shot stop check on Claude Code: a prompt-type `Stop` hook declared in the skill's frontmatter (`once: true`) re-reads the final message and sends an unsupported done/fixed/passing claim back for evidence, then removes itself. Verified end to end on Claude Code 2.1.310 (`tests/acceptance/claude-code-stop-check.sh`, `docs/verification/claude-code-stop-check-2026-10-25.md`). Other harnesses ignore the field. - `bin/godmode`: a plan-workspace helper (`workspace`, `brief`, `review-package`, `ledger`, `status`) on the shell PATH where the harness adds a plugin's `bin/` (Claude Code, Antigravity); `delegated-execution` and `inline-execution` prefer it and keep the plain-shell commands as the fallback. Tested by `tests/test-bin.sh`. - `task-planning`: every task carries an Interfaces block (what it consumes from earlier tasks, what later tasks rely on, exact signatures); the plan header gains a Review Focus section (the five input classes the design implies but no task tests); the self-review checks both. - `intent-discovery`: a builder-check prompt as a reference file, dispatched for projects only; the first message echoes a detailed request back with what the project survey found and asks the one open question; the offer to skip the questions appears only when the skill started on its own. - `test-first`: for a bug fix the reproducing test is its own commit before the fix, so the red evidence survives in history. - `fault-diagnosis` hands a verified non-obvious root cause to `knowledge-capture`. - Validator: a 20,000-byte cap per skill and a rule that `## The Protocol` sits within the first 8,000 bytes, because Claude Code re-attaches only the first 5,000 tokens of each invoked skill after compaction; `writing-skills` records both. - Plugin manifest fields `displayName`, `documentationUrl` and `supportUrl`; marketplace `tags`. ### Changed - `task-planning` writes decisions, not transcripts: a test step carries the test as code with the design's values; a code step carries the exact signature, file and pinned values, and the builder writes the body unless the signature and tests do not determine it. A plan several times longer than its design is flagged by the self-review. - `code-review`: a finding that cannot quote the line it is about is at most Minor, and reviewer agreement does not raise a severity. The shipped `code-reviewer` agent is read-only by its tool list. - Codex manifest (`.codex-plugin/plugin.json`) keeps its metadata under `extensions.com.openai` as the Codex plugin docs specify, names `doctor` as the onboarding skill, and drops the empty `hooks` key (plugins with lifecycle hooks are not eligible for the public directory). Reinstall verified on Codex CLI 0.163. - `model-routing`: a scoped re-review runs on a mid-tier model at low effort, not the cheapest tier. - Acceptance scripts pre-allow the Skill tool: a skill that declares hooks asks for permission in the default permission mode, which a headless run auto-denies. Interactive users answer the prompt once. ### Fixed - `tests/test-bin.sh` no longer fails under `pipefail` when `grep -q` closes the pipe early. Install or update: `/plugin install godmode --marketplace NoobyGains/godmode` (Claude Code), `agy plugin install https://github.com/NoobyGains/godmode` (Antigravity), `codex plugin marketplace add NoobyGains/godmode` then `codex plugin add godmode@godmode` (Codex).

  4. v2.0.0 GitHub ↗
    Original release notes

    Seven months after 1.0, a ground-up rebuild. - The session-start hook that makes skills trigger never actually ran in 1.0 (single-quoted plugin root plus a missing executable bit). It does now, on every OS, with tests on Linux, macOS and Windows. - 33 skills (was 36), rewritten so the bodies describe actions and a per-harness reference maps them to real tools. Three new ones: `grounding` (verify facts that can change against current sources, never memory), `model-routing` (cheapest capable model per seat, named on every dispatch) and `cross-model-review` (a second model family reviews before landing). `delegated-execution` gained a ledger that survives context loss, rulings instead of stalls, and a bounded fix loop. - Native manifests for Claude Code, Antigravity, Codex, Cursor, Gemini CLI and OpenCode from one repository. Verified live on Claude Code 2.1.310, Antigravity CLI 1.4.7 and Codex CLI 0.163. - A validator and CI that fail on the mistakes that broke 1.0, a `doctor` skill, and a `claude plugin eval` suite with published with/without numbers (mean 0.83 vs 0.63). - New brand, README and animated demos. Install ``` # Claude Code /plugin install godmode --marketplace NoobyGains/godmode # Antigravity agy plugin install https://github.com/NoobyGains/godmode # Codex codex plugin marketplace add NoobyGains/godmode codex plugin add godmode@godmode ``` Full notes in CHANGELOG.md. Thanks to @ivnad95, @g7trader and @AdversaLLC for diagnosing the 1.0 hook bug, and to @urbabby for the orchestrator idea.

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供了一套完整、严格的代码质量强制规范体系
  • 覆盖 lint、类型安全、测试覆盖率、构建、包体积、依赖审计、复杂度、无用代码等关键维度
  • 适用于开发者在提交代码、PR、合并前的质量门禁场景,受众广泛
Trigger Precision95/100

Highlights

  • description 明确指出使用时机为准备提交代码、发起 PR 或合并时
  • 详细列出了 linting、type safety、bundle budgets 等具体检查项
  • 触发词精准完整,边界清晰
Structure and Standards90/100

Highlights

  • 文档结构清晰,包含 Overview、Prime Directive、When to Use、Entry Protocol、Quality Check Reference、CI Pipeline Template、Cognitive Traps、Guardrails、Integration 等完整章节
  • 每个检查项都有标准、配置、工具、阈值和 rationale,逻辑严谨
  • 提供了 CI 模板作为端到端示例,frontmatter 完整
Execution Reliability95/100

Highlights

  • 所有检查项均提供了具体的工具(如 ESLint、TypeScript strict、mypy、pip-audit、cargo audit、ts-prune、knip 等)
  • 配置示例和 CI 集成命令具体可行,参数正确
  • 覆盖了主要异常(如漏洞等级、复杂度阈值),并强调了不可绕过的原则
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.