Skip to content
Back to skills

Arch Constraint Guard

ASecurity

Block edits that violate known system boundaries, team rules, service contracts, or domain-layer separation. Reads rules from `~/.fd-plan/<slug>/.codebase/CONSTRAINTS.md`.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 9, 2026
ai-agentsreactterraformapidatabase

Works with

  • api

Security analysis

A100/100

Scanned October 9, 2026

npx -y skills add alisattorov06/ali-kiro --skill arch-constraint-guard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Arch Constraint Guard?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Arch Constraint Guard
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alisattorov06-arch-constraint-guard/badge)](https://www.skillsdirectory.com/skills/alisattorov06-arch-constraint-guard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: arch-constraint-guard
description: Block edits that violate known system boundaries, team rules, service contracts, or domain-layer separation. Reads rules from `~/.fd-plan/<slug>/.codebase/CONSTRAINTS.md`.
origin: FlowDeck
---

# Architectural Constraint Guard

Before writing any file, check if the edit violates architectural boundaries defined in `~/.fd-plan/<slug>/.codebase/CONSTRAINTS.md`. If it does, stop and explain the violation.

## CONSTRAINTS.md Format

Create `~/.fd-plan/<slug>/.codebase/CONSTRAINTS.md` to encode your team's architectural rules:

```markdown
## Forbidden Paths
- src/core/         # do not modify core — all changes via PR with 2 approvals
- src/generated/    # auto-generated, do not edit manually
- infra/secrets/    # managed by Terraform only

## Layer Rules
- UI components MUST NOT import from services/ directly — use hooks/ or context/
- services/ MUST NOT import from routes/ — services are framework-agnostic
- domain/ MUST NOT import from infra/ — keep domain pure

## Service Contract Rules
- PaymentService API is frozen — no method signature changes without RFC
- UserSchema is owned by auth-team — no schema changes without approval

## Naming Conventions
- React components: PascalCase only
- Database tables: snake_case only
- API endpoints: kebab-case only
```

## Workflow

For every proposed write or edit:

1. Read `~/.fd-plan/<slug>/.codebase/CONSTRAINTS.md`
2. Check the target file path against `## Forbidden Paths`
3. Check the import graph against `## Layer Rules`
4. Check method signatures against `## Service Contract Rules`
5. If any violation is found: **STOP**, report the specific rule violated, and suggest a compliant alternative

## When No CONSTRAINTS.md Exists

If `~/.fd-plan/<slug>/.codebase/CONSTRAINTS.md` does not exist:
1. Infer boundaries from ARCHITECTURE.md (layer names, service boundaries)
2. Apply common-sense defaults: UI does not directly query DB, domain does not call HTTP
3. Suggest creating CONSTRAINTS.md to codify the rules you discover

## Violation Report Format

```
ARCH CONSTRAINT VIOLATION
Rule: [rule name from CONSTRAINTS.md]
File: [target file]
Violation: [what was attempted]
Compliant alternative: [what to do instead]
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.