architectural-gate
Skill2 starsChanged 9 months agoMITView on GitHub
HARD-GATE — multi-model review of architectural decisions before implementation proceeds
In this repository22 other files it gives its agents.
- ab-testingSkill
- ab-validateSkill
- cardio-reviewSkill
- consensusSkill
- counter-positionSkill
- cross-examinationSkill
- direct-querySkill
- doc-organizerSkill
- integrity-checkSkill
- invariance-healthSkill
- narrate-surgerySkill
- neurologistSkill
- post-implementation-verificationSkill
- pre-implementation-reviewSkill
- probeSkill
- quality-gatesSkill
- researchSkill
- review-loopSkill
- sentinelSkill
- setup-api-keysSkill
- setup-teamSkill
- using-3-surgeonsSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Do NOT implement changes until this gate passes.
- Distinctive: line 41
Not all changes need full gating.
- Very specific: line 68
Run sentinel scan on planned change description
- Distinctive: line 69
If sentinel risk = none or low: GATE PASSES — proceed
- Distinctive: line 70
If sentinel risk >= medium: escalate to Standard mode
- Very specific: line 74
Run gains-gate to verify infra health before implementation
- Very specific: line 75
If sentinel risk >= medium: run cross-examination on the plan
- Very specific: line 77
After implementation: run gains-gate again (post-gate)
- Very specific: line 81
Run cross-examination on the plan (all 3 surgeons)
- Very specific: line 82
Run counter-position protocol — argue why this plan will FAIL
- Very specific: line 83
Run gains-gate to verify infra health
- Distinctive: line 86
If post-gate fails: diagnose and fix before claiming done
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Architectural Gate
The Core Invariance Skill
This is the primary quality gate for the 3-Surgeons invariance suite. It ensures that no significant change proceeds without proportional scrutiny.
<HARD-GATE>
Do NOT implement changes until this gate passes. The gate can be quick (Light mode) or thorough (Full mode), but it MUST run. Skipping this gate violates epistemological invariance.
</HARD-GATE>Auto-Invocation Triggers
Invoke this skill when ANY of these signals are present:
| Signal | Examples |
| Architectural decision | New subsystem, data flow change, module restructuring |
| >3 files will change | Multi-file refactor, cross-cutting concern |
| New dependency added | npm/pip package, external service, API integration |
| Security-sensitive code | Auth, crypto, input validation, secrets handling |
| Database schema change | Migration, new table, index change, column alter |
| API surface change | New endpoint, modified contract, breaking change |
| Config/infrastructure change | Docker, CI/CD, env vars, deploy config |
If even ONE signal is present, this gate fires.
Risk Stratification
Not all changes need full gating. The gate assesses risk across multiple dimensions and selects a proportional mode:
Risk Dimensions (multi-axis, not scalar)
| Dimension | Low | Medium | High |
| Blast radius | 1 file | 2-5 files | >5 files |
| Reversibility | Easy rollback | Moderate effort | Hard/impossible |
| Security exposure | No auth/crypto | Touches validation | Auth/crypto/secrets |
| Data impact | Read-only | Schema additive | Schema destructive |
| External coupling | No new deps | New internal dep | New external service |
Mode Selection
| Mode | When | What Runs | Target Time |
| Light | All dimensions Low. Single-file, clear scope, no arch change | Sentinel scan only. If risk=low, proceed. | <30s |
| Standard | Any dimension Medium. 2-5 files, moderate complexity | Sentinel + gains-gate. Cross-exam if sentinel >= medium. | <120s |
| Full | Any dimension High. >5 files, security, schema, new subsystem | Sentinel + cross-exam + counter-position + gains-gate. | <300s |
Mode is determined by highest-risk dimension, not average. One High dimension = Full mode, even if everything else is Low.
Checklist
You MUST create a TodoWrite task for each step and complete them in order:
Light Mode
- Run
sentinelscan on planned change description - If sentinel risk = none or low: GATE PASSES — proceed
- If sentinel risk >= medium: escalate to Standard mode
Standard Mode
- Run
sentinelscan on planned change description - Run
gains-gateto verify infra health before implementation - If sentinel risk >= medium: run
cross-examinationon the plan - Present gate results — proceed only if no critical flags
- After implementation: run
gains-gateagain (post-gate)
Full Mode
- Run
sentinelscan on planned change description - Run
cross-examinationon the plan (all 3 surgeons) - Run
counter-positionprotocol — argue why this plan will FAIL - Run
gains-gateto verify infra health - Present gate results with all surgeon opinions — proceed only with approval
- After implementation: run
gains-gateagain (post-gate) - If post-gate fails: diagnose and fix before claiming done
Emergency Bypass Protocol
For critical hotfixes (production down, security vulnerability, data loss):
- Declare emergency — state what is broken and why bypass is needed
- Implement fix — proceed without full gating
- Post-mortem gate — within 24h, run Full mode architectural-gate on the emergency fix
- Evidence capture — log bypass reason, outcome, and whether the gate would have caught the issue
- Surface to Aaron — emergency bypasses always surface to the human operator
This is the release valve. It exists so the gate does not become the thing that kills the system it protects.
Integration with Superpowers
This skill fires BEFORE brainstorming/writing-plans. It supplements the superpowers workflow:
Signal detected → architectural-gate → [brainstorming] → [writing-plans] → [executing-plans]The gate does NOT replace superpowers' process invariance. It adds epistemological invariance on top — ensuring the right questions are asked before the process begins.
What NOT to Do
- Do NOT skip the gate because it "seems simple" — Light mode exists for simple changes. Use it.
- Do NOT run Full mode on everything — that creates cross-exam fatigue and delivery freeze.
- Do NOT ignore sentinel warnings — if sentinel flags medium+, escalate. The flag is the value.
- Do NOT override surgeon disagreements without evidence — present disagreements to Aaron.
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.

