guardrails-configurator
Skill0 starsChanged 4 months agoMITView on GitHub
Interviews you to configure project engineering guardrails (code, architecture, security, testing, git/PR, ops, AI agent behavior) and writes them to a durable project file. Use for greenfield setup, “set our rules”, or refreshing standards. Emits GUARDRAILS_CONFIG. Never invents team policy as fact, never overwrites an existing guardrails file without confirmation, and never starts feature work.
In this repository27 other files it gives its agents.
- adr-enforcerSkill
- ai-eval-harnessSkill
- api-contract-guardianSkill
- change-impact-analyzerSkill
- code-reviewerSkill
- context-loaderSkill
- defect-analystSkill
- delivery-plannerSkill
- engineering-mentorSkill
- engineering-osSkill
- feature-implementerSkill
- incident-commanderSkill
- loop-engineerSkill
- migration-surgeonSkill
- model-routerSkill
- observability-designerSkill
- performance-auditorSkill
- postmortem-writerSkill
- pr-generatorSkill
- quality-gateSkill
- refactoring-advisorSkill
- requirements-grillSkill
- security-auditorSkill
- spec-validatorSkill
- tdd-executorSkill
- test-strategy-designerSkill
- threat-modelerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 17 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 28
Write access to the target project path.
- Distinctive: line 29
If an existing guardrails file is present → enter update mode (diff + confirm), never silent overwrite.
- Distinctive: line 47
Ask before inventing policy.
- Distinctive: line 48
Prefer short, enforceable rules over essays.
- Distinctive: line 59
Search for existing standards (do not dump them into chat—summarize):
- Distinctive: line 75
Ask one domain at a time. Offer sensible defaults.
- Distinctive: line 77
Use concise multiple-choice + freeform “anything else?” per domain.
- Distinctive: line 98
When ADRs are required
- Distinctive: line 158
Create directories if needed.
- Distinctive: line 159
Write/update the canonical file.
- Very specific: line 160
If export requested, write .cursor/rules/engineering-guardrails.mdc with alwaysApply: true (or user-chosen globs) summarizing the same …
- Distinctive: line 165
If user says “quick defaults for a TypeScript/Next app” (or similar): propose a complete draft from stack defaults, then confirm each …
- Distinctive: line 171
Never claim unstated policy as adopted.
- Very specific: line 184
Treat missing security or data-handling rules as High gaps when the stack handles auth/PII/payments.
- Distinctive: line 257
Never overwrite guardrails without explicit confirmation.
- Distinctive: line 258
Never invent security or compliance policy.
- Distinctive: line 259
Never bury Critical Never-rules in prose — put them in Never.
- Distinctive: line 260
Never start implementing product features inside this skill.
- Distinctive: line 261
Never commit secrets into the guardrails file.
≈ “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
Purpose
Turn tribal engineering standards into a single authoritative guardrails document that every OS skill and coding agent can load and obey.
You ask; the user decides. You write the file only after confirmation.
When to Use / When NOT to Use
Use when: new project; “configure rules/guardrails”; onboarding agents to a repo; standards are tribal/undocumented; refreshing stale conventions.
Do not use when: one-off feature implementation; ADR for a single decision (adr-enforcer); product requirements grilling (requirements-grill); security audit of existing code (security-auditor).
Preconditions
- User is willing to answer configuration questions (or point at existing docs to import).
- Write access to the target project path.
- If an existing guardrails file is present → enter update mode (diff + confirm), never silent overwrite.
Inputs / Outputs
Inputs: optional existing standards (README, CONTRIBUTING, ADRs, .cursor/rules/, AGENTS.md), CONTEXT_PACK if available.
Outputs:
GUARDRAILS_CONFIG(session summary)- Project file written after user confirms (default path below)
Upstream / Downstream
Upstream: user, context-loader, engineering-mentor, engineering-os (bootstrap).
Downstream: context-loader (must load the file), adr-enforcer, code-reviewer, security-auditor, quality-gate, feature-implementer, delivery-planner.
Core Principles
- Ask before inventing policy.
- Prefer short, enforceable rules over essays.
- Separate must / should / never.
- One source of truth file; optional agent-specific exports.
- Progressive interview — domain batches, skip what already exists.
- Confirm path + content before writing.
- Version the document (
version,updated).
Process
0. Discover
Search for existing standards (do not dump them into chat—summarize):
docs/ENGINEERING_GUARDRAILS.md(canonical for this OS)AGENTS.md,CLAUDE.md,.cursorrules.cursor/rules/**CONTRIBUTING.md,docs/architecture/**, ADRs- linters/formatters configs (eslint, prettier, ruff, etc.) as hints only
Report what was found. Ask:
- Mode:
create|update|import-and-merge - Output path (default:
docs/ENGINEERING_GUARDRAILS.md) - Also export? none |
.cursor/rules/engineering-guardrails.mdc|AGENTS.mdsection | both
1. Interview (domain batches)
Ask one domain at a time. Offer sensible defaults; user can accept, edit, or skip.
Use concise multiple-choice + freeform “anything else?” per domain.
Domain A — Project identity
- Stack / languages / frameworks
- Monorepo vs single package
- Primary runtime targets (web, API, mobile, data, CLI)
Domain B — Code style
- Formatter/linter source of truth
- Naming conventions (files, components, DB)
- Comments/docs expectations
- Forbidden patterns (any,
@ts-ignore, etc.) - PR diff size / “no drive-by refactors”
Domain C — Architecture
- Layering / module boundaries
- Allowed dependency directions
- Where business logic lives
- When ADRs are required
- New frameworks/libs policy (forbid by default?)
- Multi-tenant / bounded contexts if relevant
Domain D — Security & privacy
- Authn/authz defaults
- Secret handling (env only, no logs)
- PII / data classification
- Dependency / supply-chain expectations
- Threat modeling required for which changes?
- Forbidden: eval of user input, raw SQL concat, etc.
Domain E — Testing & quality
- Required test levels by change type
- Coverage policy (if any — avoid vanity %)
- CI blocking checks
- Flake policy
- Definition of done
Domain F — Git & review
- Branch naming, commit style
- PR requirements (template, reviewers, checks)
- Merge strategy
- What blocks merge (Critical findings, failing CI, …)
Domain G — Operations
- Environments / promote path
- Migrations policy (expand/contract?)
- Observability minimum (logs, metrics, alerts)
- Feature flags
- On-call / incident severity if applicable
Domain H — AI agent behavior
- What agents may do without asking (read, lint, tests)
- What always needs approval (prod, force-push, schema destroy, secrets)
- Skills/OS path expectations (use engineering-os? lite vs standard)
- Files agents must always load (this guardrails file, ADRs, …)
- Max scope / “stop and ask” triggers
Domain I — Exceptions
- How to request waivers
- Who can approve exceptions
- Time-boxed exceptions only?
2. Draft
Build the guardrails markdown (template below). Mark any unanswered critical items as TODO(owner) — do not invent.
Show a short summary of must/never lists. Ask: Write to <path>?
3. Write
On explicit confirmation:
- Create directories if needed.
- Write/update the canonical file.
- If export requested, write
.cursor/rules/engineering-guardrails.mdcwithalwaysApply: true(or user-chosen globs) summarizing the same must/never rules — keep it shorter than the canonical doc; link to the canonical path. - Emit
GUARDRAILS_CONFIG.
4. Lite mode
If user says “quick defaults for a TypeScript/Next app” (or similar): propose a complete draft from stack defaults, then confirm each domain in one pass (accept/edit), then write.
Evidence Requirements
- Quote user answers or cite imported files when stating a rule.
- List unresolved TODOs explicitly.
- Never claim unstated policy as adopted.
Stop Conditions / Failure Modes
| Condition | Action |
| User refuses to answer Critical security/architecture domains | Write only with ProceedWithConditions + TODOs, or Block write if they want “complete” |
| Existing file and no overwrite confirmation | Do not write |
| Conflicting answers within interview | Surface conflict; resolve before write |
| Path outside project / suspicious | Refuse |
Severity + Confidence
Treat missing security or data-handling rules as High gaps when the stack handles auth/PII/payments.
Output Contract
File template (docs/ENGINEERING_GUARDRAILS.md)
# Engineering Guardrails
- Version: 1.0.0
- Updated: YYYY-MM-DD
- Owner: ...
- Status: Active
## Must
- ...
## Should
- ...
## Never
- ...
## Code style
...
## Architecture
...
## Security & privacy
...
## Testing & quality
...
## Git & review
...
## Operations
...
## AI agents
- Always load this file before non-trivial work.
- ...
## Exceptions
...
## Open TODOs
- ...GUARDRAILS_CONFIG
## GUARDRAILS_CONFIG
Mode: create | update | import-and-merge
Path: docs/ENGINEERING_GUARDRAILS.md
Exports: none | cursor-rules | agents-md | both
Domains completed: ...
Critical gaps / TODOs: ...
Decision: Proceed | ProceedWithConditions | Revise | BlockHandoffs
- context-loader — load the new file at high priority
- adr-enforcer — architecture section may require bootstrap ADRs
- engineering-os — subsequent work should respect AI agents section
- security-auditor / quality-gate — enforce Never/Must lists
Never
- Never overwrite guardrails without explicit confirmation.
- Never invent security or compliance policy.
- Never bury Critical Never-rules in prose — put them in Never.
- Never start implementing product features inside this skill.
- Never commit secrets into the guardrails file.
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.

