Automated Standards Enforcement
Overview
P0 Foundational - Applies by default. Zero-warning clean builds. Baseline for brownfield.
REQUIRED: superpowers:verification-before-completion, superpowers:test-driven-development
Bootstrapping Skills Decision Matrix
Use this matrix to select the appropriate bootstrapping skill:
| If You Need To... |
Use This Skill |
| Start a new project from scratch |
greenfield-baseline |
| Add/audit quality tooling (linting, tests, SAST) |
automated-standards-enforcement (this) |
| Add/audit repo security (branch protection, secret scanning) |
repo-best-practices-bootstrap |
Skill Scope Comparison
| Aspect |
greenfield-baseline |
automated-standards-enforcement |
repo-best-practices-bootstrap |
| Primary Focus |
Project foundation |
Quality tooling |
Repo security/compliance |
| Project State |
New (no existing code) |
New or existing |
New or existing |
| Outputs |
Repo structure, CI/CD, docs |
Linting, tests, SAST config |
Branch rules, secrets config |
| Triggers |
Entry point for new projects |
Auto-triggered or standalone |
Use after structure exists |
Invocation Context
- Greenfield projects: Auto-triggered by greenfield-baseline
- Brownfield projects: Invoke directly with brownfield approach
- Existing repos: Invoke directly for quality tooling audit/addition
Do NOT Use This Skill When
- Starting a brand new project (use greenfield-baseline, which triggers this skill)
- Only need repo security/compliance (use repo-best-practices-bootstrap)
- Quality tooling already exists and passes (no changes needed)
When to Use
- Creating/modifying repository
- Opt-out: User explicitly refuses
Core Workflow
- Announce skill (default for all repos)
- Identify: linting, spelling, tests, SAST, security
- Map to tools (Tool Comparison)
- Enforce: pre-commit hooks + CI
- Single-command local run (
npm run validate)
- Document in README.md
- Clean build (zero warnings)
- Exceptions:
docs/known-issues.md
- IDE integrations (IDE Integration)
- Brownfield: baseline, enforce on new code
Quick Reference
| Standard |
Typical Tools |
Enforcement |
| Linting |
ESLint, Ruff, dotnet-format |
Pre-commit + CI |
| Formatting |
Prettier, Black |
Pre-commit |
| Spelling |
cspell |
Pre-commit + CI |
| Tests |
Jest, pytest, xUnit |
CI (coverage gates) |
| Security |
npm-audit, bandit, SAST |
CI |
See Language Configs for ecosystem-specific setup.
Clean Build Policy
Zero warnings/errors required. Exceptions documented in docs/known-issues.md with
justification and remediation plan. See Git Hooks Setup
and CI Configuration for enforcement.
Brownfield Approach
- Run baseline to identify existing violations
- Document in
docs/known-issues.md with counts
- Pre-commit: check modified files only
- CI: document baseline exceptions
- Incremental remediation over time
Red Flags - STOP
- "Can add linting later"
- "MVP doesn't need quality checks"
- "Too many violations to fix"
- "Hooks slow development"
- "Clean build too strict"
All mean: Apply brownfield approach or document explicit opt-out.
See Tool Comparison for selection guidance.
Reference CI Workflow Templates
Use pre-built CI workflow templates for common platforms:
| Platform |
Template |
Description |
| GitHub Actions |
templates/github-lint-workflow.yml.template |
Lint and format check |
| GitHub Actions |
templates/github-security-workflow.yml.template |
Security scanning |
| Azure DevOps |
templates/azure-pipelines-lint.yml.template |
Lint pipeline |
Using Templates
- Copy template to
.github/workflows/ or pipeline directory
- Replace
{LANGUAGE} with your primary language (node, dotnet, python)
- Adjust tool commands to match your
package.json / Makefile scripts
- Commit and verify workflow runs
1---2name: automated-standards-enforcement3description: Use when creating or modifying any repository to establish automated quality enforcement (linting, spelling, tests, SAST, security). Applies by default unless user explicitly refuses. Ensures clean build policy with minimal developer friction.4---56# Automated Standards Enforcement78## Overview910**P0 Foundational** - Applies by default. Zero-warning clean builds. Baseline for brownfield.1112**REQUIRED:** superpowers:verification-before-completion, superpowers:test-driven-development1314## Bootstrapping Skills Decision Matrix1516Use this matrix to select the appropriate bootstrapping skill:1718| If You Need To... | Use This Skill |19| ------------------------------------------------------------ | ------------------------------------------ |20| Start a new project from scratch | greenfield-baseline |21| Add/audit quality tooling (linting, tests, SAST) | **automated-standards-enforcement** (this) |22| Add/audit repo security (branch protection, secret scanning) | repo-best-practices-bootstrap |2324### Skill Scope Comparison2526| Aspect | greenfield-baseline | automated-standards-enforcement | repo-best-practices-bootstrap |27| ----------------- | ---------------------------- | ------------------------------- | ----------------------------- |28| **Primary Focus** | Project foundation | Quality tooling | Repo security/compliance |29| **Project State** | New (no existing code) | New or existing | New or existing |30| **Outputs** | Repo structure, CI/CD, docs | Linting, tests, SAST config | Branch rules, secrets config |31| **Triggers** | Entry point for new projects | Auto-triggered or standalone | Use after structure exists |3233### Invocation Context3435- **Greenfield projects**: Auto-triggered by greenfield-baseline36- **Brownfield projects**: Invoke directly with brownfield approach37- **Existing repos**: Invoke directly for quality tooling audit/addition3839### Do NOT Use This Skill When4041- Starting a brand new project (use greenfield-baseline, which triggers this skill)42- Only need repo security/compliance (use repo-best-practices-bootstrap)43- Quality tooling already exists and passes (no changes needed)4445## When to Use4647- Creating/modifying repository48- **Opt-out**: User explicitly refuses4950## Core Workflow51521. Announce skill (default for all repos)532. Identify: linting, spelling, tests, SAST, security543. Map to tools ([Tool Comparison](references/tool-comparison.md))554. Enforce: pre-commit hooks + CI565. Single-command local run (`npm run validate`)576. Document in README.md587. Clean build (zero warnings)598. Exceptions: `docs/known-issues.md`609. IDE integrations ([IDE Integration](references/ide-integration.md))6110. Brownfield: baseline, enforce on new code6263## Quick Reference6465| Standard | Typical Tools | Enforcement |66| ---------- | --------------------------- | ------------------- |67| Linting | ESLint, Ruff, dotnet-format | Pre-commit + CI |68| Formatting | Prettier, Black | Pre-commit |69| Spelling | cspell | Pre-commit + CI |70| Tests | Jest, pytest, xUnit | CI (coverage gates) |71| Security | npm-audit, bandit, SAST | CI |7273See [Language Configs](references/language-configs.md) for ecosystem-specific setup.7475## Clean Build Policy7677**Zero warnings/errors required.** Exceptions documented in `docs/known-issues.md` with78justification and remediation plan. See [Git Hooks Setup](references/git-hooks-setup.md)79and [CI Configuration](references/ci-configuration.md) for enforcement.8081## Brownfield Approach82831. Run baseline to identify existing violations842. Document in `docs/known-issues.md` with counts853. Pre-commit: check modified files only864. CI: document baseline exceptions875. Incremental remediation over time8889## Red Flags - STOP9091- "Can add linting later"92- "MVP doesn't need quality checks"93- "Too many violations to fix"94- "Hooks slow development"95- "Clean build too strict"9697**All mean: Apply brownfield approach or document explicit opt-out.**9899See [Tool Comparison](references/tool-comparison.md) for selection guidance.100101## Reference CI Workflow Templates102103Use pre-built CI workflow templates for common platforms:104105| Platform | Template | Description |106| -------------- | -------------------------------------------------------------------------------------------------- | --------------------- |107| GitHub Actions | [templates/github-lint-workflow.yml.template](templates/github-lint-workflow.yml.template) | Lint and format check |108| GitHub Actions | [templates/github-security-workflow.yml.template](templates/github-security-workflow.yml.template) | Security scanning |109| Azure DevOps | [templates/azure-pipelines-lint.yml.template](templates/azure-pipelines-lint.yml.template) | Lint pipeline |110111### Using Templates1121131. Copy template to `.github/workflows/` or pipeline directory1142. Replace `{LANGUAGE}` with your primary language (node, dotnet, python)1153. Adjust tool commands to match your `package.json` / `Makefile` scripts1164. Commit and verify workflow runs