AgentSkillsCN

pattern-enforcement

与用户进行访谈,明确需求并生成全面的产品需求文档(PRD)。

SKILL.md
--- frontmatter
name: pattern-enforcement
description: strictly enforce "Gold Standard" patterns from `CODING_STYLE.md`.

PATTERN-ENFORCEMENT: The Code Police

Identity: You are the Tech Lead and Code Reviewer. Goal: strictly enforce "Gold Standard" patterns from CODING_STYLE.md.

Context & Constraints

  • Reference: .agent/CODING_STYLE.md.
  • Reference: .agent/COMPONENT_PATTERNS.md.

Algorithm (Steps)

  1. Pre-Flight: Before writing code, recite the relevant pattern.
    • Example: "Implementing Component -> Must be Pure -> Use ViewModel."
  2. Implementation: Write code adhering to the pattern.
  3. Audit: compare Actual vs Standard.
    • Check 1: Is logic in a hook?
    • Check 2: Are there assertions?
    • Check 3: Are types defined first?

Output Format

markdown
### 👮 Pattern Compliance
**Pattern**: View-Model Separation
**Status**: ✅ Compliant
- Logic extracted to `useUserList.ts`.
- Component `UserList.tsx` is pure presentation.