broken-window
Skill4 starsChanged 10 months agoMITView on GitHub
Use when warnings/errors occur during git operations, package management, builds, or when reviewing completed work for standards violations. Fix immediately unless impact doubles delivery time.
In this repository67 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agents-onboardingSkill
- agent-workitem-automationSkill
- architecture-testingSkill
- aspire-integration-testingSkill
- automated-standards-enforcementSkill
- best-practice-introductionSkill
- branching-strategy-and-conventionsSkill
- change-risk-rollbackSkill
- ci-cd-conformanceSkill
- component-boundary-ownershipSkill
- contract-consistency-validationSkill
- csharp-best-practicesSkill
- deployment-provenanceSkill
- documentation-as-codeSkill
- documentation-scaffoldSkill
- dotnet-bespoke-code-minimisationSkill
- dotnet-best-practicesSkill
- dotnet-domain-primitivesSkill
- dotnet-efcore-practicesSkill
- dotnet-healthchecksSkill
- dotnet-logging-serilogSkill
- dotnet-mapping-standardSkill
- dotnet-open-source-first-governanceSkill
- dotnet-source-generation-firstSkill
- dotnet-specification-patternSkill
- dotnet-testing-assertionsSkill
- environment-traceabilitySkill
- finishing-a-development-branch-iddSkill
- greenfield-baselineSkill
- impacted-scope-enforcementSkill
- incremental-change-impactSkill
- incremental-deploymentSkill
- innersource-governance-bootstrapSkill
- issue-driven-deliverySkill
- library-extraction-stabilisationSkill
- local-dev-experienceSkill
- markdown-authorSkill
- modern-csharp-coding-standardsSkill
- monorepo-orchestration-setupSkill
- observability-logging-baselineSkill
- pair-programmingSkill
- persona-switchingSkill
- process-skill-routerSkill
- quality-gate-enforcementSkill
- release-tagging-planSkill
- repo-best-practices-bootstrapSkill
- repository-foundation-bootstrapSkill
- requirements-gatheringSkill
- runtime-tooling-validationSkill
- safe-brownfield-refactorSkill
- scoped-colocationSkill
- security-processesSkill
- selective-build-testSkill
- semantic-version-impactSkill
- session-awareSkill
- skills-first-workflowSkill
- static-analysis-securitySkill
- structured-review-workflowSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Before declaring work complete
- Distinctive: line 36
If fix time >= 2x remaining work, create tech-debt issue with steps to replicate
- Distinctive: line 37
Verify warning/error is resolved or issue is created
- Distinctive: line 67
If fix time < 2x → Fix immediately
- Very specific: line 68
If fix time ≥ 2x → Create tech-debt issue (label: tech-debt, include steps to replicate, fix estimate)
- Distinctive: line 69
Verify warning gone or issue created
- Distinctive: line 74
Check for: tests, documentation, code patterns, linting
- Distinctive: line 83
Check for AGENTS.md with skills-first-workflow
- Distinctive: line 84
Verify superpowers installed and required skills loaded
- Distinctive: line 130
Use this script to quickly address multiple broken windows before commits.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Broken Window
Overview
Fix warnings, errors, and standards violations immediately. Broken windows—small signs of neglect—compound into technical debt. The 2x rule: fix now unless fix time > 2x remaining work.
Violating the letter of these rules IS violating the spirit of these rules. The 2x threshold is objective and measurable—there is no "spirit vs letter" escape.
REQUIRED BACKGROUND: superpowers:verification-before-completion, superpowers:systematic-debugging
When to Use
Always triggered for:
- Warnings/errors during git, npm, build, or test operations
- Before declaring work complete
- Standards violations detected during code review
- Skills-first repos: Before starting work (validate prerequisites)
Core Workflow
- Detect warning, error, or standards violation
- Investigate root cause and document finding
- Estimate fix time and remaining work time
- Apply 2x rule: if fix time < 2x remaining work, fix immediately
- If fix time >= 2x remaining work, create tech-debt issue with steps to replicate
- Verify warning/error is resolved or issue is created
- Continue with original task
The 2x Rule
digraph fix_decision {
"Warning/Error Detected" [shape=box];
"Estimate Fix Time" [shape=box];
"Estimate Remaining Work" [shape=box];
"Fix Time < 2x Remaining?" [shape=diamond];
"Fix Immediately" [shape=box, style=filled, fillcolor=lightgreen];
"Create Tech-Debt Issue" [shape=box, style=filled, fillcolor=yellow];
"Warning/Error Detected" -> "Estimate Fix Time";
"Estimate Fix Time" -> "Estimate Remaining Work";
"Estimate Remaining Work" -> "Fix Time < 2x Remaining?";
"Fix Time < 2x Remaining?" -> "Fix Immediately" [label="yes"];
"Fix Time < 2x Remaining?" -> "Create Tech-Debt Issue" [label="no"];
}Example: Remaining work = 15 minutes. Fix takes 10 minutes. Ratio = 0.67x. Fix immediately.
Required Actions
When Warning/Error Appears
- Investigate root cause
- Estimate fix time vs remaining work
- If fix time < 2x → Fix immediately
- If fix time ≥ 2x → Create tech-debt issue (label:
tech-debt, include steps to replicate, fix estimate) - Verify warning gone or issue created
Before Declaring Complete
- Review against repository standards (README, CONTRIBUTING, docs/)
- Check for: tests, documentation, code patterns, linting
- Apply 2x rule to each violation
- Fix or create tech-debt issue for each violation
- Then declare complete
Skills-First Repositories
Before starting implementation:
- Check for
AGENTS.mdwith skills-first-workflow - Verify superpowers installed and required skills loaded
- Load missing skills before proceeding
Red Flags - STOP
- "It's just a warning" / "Normal behaviour" / "Can fix later"
- "No time now" (without 2x calculation)
- "User didn't ask for tests/docs"
- "Scope creep" / "Need to balance"
- "I'll set up linting/verification tools later"
- Working in repo with package.json but no node_modules
All mean: Apply 2x rule. Fix or create tech-debt issue. No ignoring.
See references/rationalizations.md for complete excuse table and brownfield strategies.
Quick-Fix Scripts
Common broken window scenarios with immediate fixes:
| Scenario | Fix Command | Description |
| Format violations | npm run lint:fix / dotnet format | Auto-fix formatting issues |
| Spelling errors | Update cspell.json words list | Add valid technical terms |
| Missing dependencies | npm ci / dotnet restore | Restore package dependencies |
| Outdated lockfile | npm install | Regenerate package-lock.json |
Quick-Fix Script Template
For projects with multiple fix commands, create scripts/fix-all.sh:
#!/usr/bin/env bash
# fix-all.sh - Fix common broken window issues
set -euo pipefail
echo "=== Restoring dependencies ==="
npm ci 2>/dev/null || dotnet restore 2>/dev/null || echo "No package manager detected"
echo "=== Fixing formatting ==="
npm run lint:fix 2>/dev/null || dotnet format 2>/dev/null || echo "No formatter configured"
echo "=== Done ==="
echo "Run 'npm run lint' or equivalent to verify all issues resolved"Use this script to quickly address multiple broken windows before commits.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

