SuperAPI AI Directory

rule-manager

General & other

View repository

Updated 10-15 20:08

About this skill

Rule Manager

Analyzes the repository structure and adds Skill-based rules in the appropriate location.

Core Principles

  1. Ask if ambiguous: Always confirm unclear requirements
  2. Analyze structure first: Decide after identifying existing patterns
  3. User confirmation required: Always request approval before adding/modifying
  4. Progressive Disclosure: Apply the 3-stage loading principle to rules as well

Workflow Overview

[요청 접수] → [구조 분석] → [위치 판단] → [사용자 확인] → [규칙 추가]
     │            │             │              │              │
     ▼            ▼             ▼              ▼              ▼
  모호함 확인   skills/     기존 추가 or    제안 검토      SKILL.md 생성
               agents/      새 구조 제안    승인/수정      또는 기존 수정
               rules/ 파악

Step 1: Request Analysis

When receiving a user request, check the following:

Check items Example questions
Purpose of the rule "What problem does this rule solve?"
Scope of application "Does it apply only to specific files/directories?"
Trigger conditions "When should this rule be activated?"
Conflict with existing rules "Is there a similar existing rule?"

If ambiguous, always ask questions.

Step 2: Structure Analysis

Analyze the rule-related structure of the repository:

# 기존 skills 확인
ls -la skills/

# 기존 rules 확인 (있는 경우)
ls -la rules/ 2>/dev/null || echo "rules/ 없음"

# assets/rules 확인 (있는 경우)
ls -la assets/rules/ 2>/dev/null || echo "assets/rules/ 없음"

# 기존 패턴 파악
find . -name "SKILL.md" -o -name "*.mdc" -o -name ".cursorrules" 2>/dev/null

Report analysis results:

## 현재 구조 분석 결과

- **Skills**: X개 존재 (skills/)
- **Rules**: Y개 존재 (경로)
- **패턴**: [발견된 패턴 설명]
- **관련 기존 규칙**: [있으면 나열]

Step 3: Location Determination

Based on the analysis results, determine the location of the rule:

Determination criteria Decision
Similar existing skill exists Add content to existing skill
New domain Create new skill
Common to multiple skills Higher-level skill or separate into references/

Determination type:

A. Add to existing Skill

기존 skills/{name}/SKILL.md 에 섹션 추가
또는 references/에 새 파일 추가

B. Create new Skill

skills/{new-name}/
├── SKILL.md
└── references/ (필요시)

C. Propose improvement to existing structure

현재: 분산된 규칙들
제안: 통합 또는 재구조화

Step 4: User Confirmation

Always propose in the following format and obtain approval:

## 규칙 추가 제안

### 규칙 정보
- **이름**: {name}
- **목적**: {purpose}
- **트리거**: {when}

### 위치 결정
- **유형**: 기존 추가 / 새 생성
- **경로**: skills/{name}/...
- **이유**: {why}

### 변경 내용 미리보기

[변경될 내용 또는 새로 생성될 파일 미리보기]

---

이대로 진행할까요? (Y/N/수정 요청)

Step 5: Add Rule

Execute after user approval:

When creating a new Skill

mkdir -p skills/{name}/references

Write SKILL.md (apply progressive-disclosure principle):

---
name: {name}
description: >
  {무엇을 하는지 1-2문장}
  {언제 활성화되는지 트리거 키워드}
user-invocable: false  # 자동 적용 규칙인 경우
---

# {제목}

{핵심 내용 - 500줄 이하}

## 상세 가이드

- [상세 내용](references/detail.md)

When modifying an existing Skill

  1. Back up existing SKILL.md (optional)
  2. Add content to the appropriate section
  3. If over 500 lines, separate into references/

Settings by rule type

Rule type user-invocable Description
Coding convention false Auto-apply
Style guide false Auto-apply
Work instructions true (default) Explicit invocation
Checklist true Explicit invocation

Checklist

After rule addition is complete, verify:

[ ] name이 1-64자, 소문자/숫자/하이픈만 사용하는가?
[ ] description이 무엇+언제를 명확히 설명하는가?
[ ] 트리거 키워드가 포함되어 있는가?
[ ] SKILL.md가 500줄 이하인가?
[ ] 상세 내용이 references/로 분리되었는가?
[ ] 기존 규칙과 충돌이 없는가?
[ ] 사용자 승인을 받았는가?

Completion report

## 규칙 추가 완료

- **이름**: {name}
- **경로**: skills/{name}/
- **파일**:
  - SKILL.md
  - references/ (있는 경우)

### 사용 방법

- 자동 적용: {조건 설명}
- 수동 호출: `/{name}` (user-invocable인 경우)

### 검증 결과

[체크리스트 통과 여부]

Detailed Guide