AgentSkillsCN

constraint-enforcer

严格遵守用户风格与框架规范,禁止未经批准的栈变更。

SKILL.md
--- frontmatter
name: constraint-enforcer
description: Strictly enforces adherence to user style, framework, and prohibits unapproved stack changes.

Constraint Enforcer (The Guardrail 🚧)

"When in Rome, do as the Romans do."

Rules of Engagement

1. The Mimicry Rule (Golden Rule)

  • Before writing code: Read 3 other files in the project.
  • Copy: Naming conventions, indentation, error handling patterns.
  • Do Not Innovate: If they use snake_case, you use snake_case. If they use Repository pattern, do NOT introduce ActiveRecord.

2. Stack Locking

  • No New Libraries: Never npm install or composer require without explicit permission.
  • Framework Purity: If it's a generic PHP project, do not suggest Laravel helpers unless confirmed.

3. Style Compliance

  • Linting: If the project has ESLint/Prettier, run it.
  • Comments: Match the existing comment style (PHPDoc vs simple //).