Configure the target project's CLAUDE.md and AGENTS.md to match the harness system. CLAUDE.md is a minimal entry point within 20 lines, AGENTS.md is 70-90 lines of core rules.
Persona
UI Proto harness setup expert. Remove content in CLAUDE.md that duplicates AGENTS.md, and check the 4 sections of AGENTS.md to fill in any omissions. Delete cursor rules.
Prerequisites
- Target project rootrun from (the target project, not peach-harness itself)
- Must be a Frontend-Only structure (
src/modules*exists,api/와front/absent) - The peach-harness skill must be installed
Workflow
Step 1: Analyze current state
Check the following:
# CLAUDE.md 존재 여부 + 내용
cat CLAUDE.md 2>/dev/null || echo "CLAUDE.md 없음"
# AGENTS.md 존재 여부 + 내용
cat AGENTS.md 2>/dev/null || echo "AGENTS.md 없음"
# 프로젝트 구조 감지
ls -d api/ front/ 2>/dev/null && echo "모노레포 구조 — peach-setup-harness 사용 권고" || echo "모노레포 아님"
ls -d src/modules*/ 2>/dev/null && echo "Frontend-Only UI Proto 프로젝트" || echo "src/modules*/ 없음"
# 모듈 루트 감지
ls -d src/modules*/ 2>/dev/null
# 디자인 시스템 감지
ls src/**/theme.css 2>/dev/null && echo "디자인 시스템 존재" || echo "theme.css 없음"
# cursor rules 존재 여부
ls .cursor/rules/ 2>/dev/null && echo "root cursor rules 존재" || echo "root cursor rules 없음"
ls .cursorrules 2>/dev/null && echo ".cursorrules 존재" || echo ".cursorrules 없음"
Organize the analysis results:
- CLAUDE.md: existence, current line count, list of sections duplicating AGENTS.md
- AGENTS.md: existence, presence of the 4 sections
- Project type: Frontend-Only (
src/modules*) confirmed - Module root:
ls -d src/modules*/use the result of{모듈구조}as - Design system: whether theme.css exists
- cursor rules: existence and file list
Step 2: Check the 4 sections of AGENTS.md
If AGENTS.md exists, check whether the following 4 sections are present:
grep -l "공통 원칙\|_common.*import" AGENTS.md 2>/dev/null && echo "§1.공통원칙 존재" || echo "§1.공통원칙 누락"
grep -l "프론트엔드 규칙\|computed" AGENTS.md 2>/dev/null && echo "§2.프론트엔드 존재" || echo "§2.프론트엔드 누락"
grep -l "테스트\|test:run\|vue-tsc" AGENTS.md 2>/dev/null && echo "§3.테스트 존재" || echo "§3.테스트 누락"
grep -l "Bounded Autonomy\|Must Follow" AGENTS.md 2>/dev/null && echo "§4.BA 존재" || echo "§4.BA 누락"
When a missing section is found, use the references below as the source:
| Section | Source file |
|---|---|
| 1. Common principles | peach-setup-ui-proto/references/01-common.md |
| 2. Frontend rules | peach-setup-ui-proto/references/02-frontend.md |
| 3. Testing and quality | peach-setup-ui-proto/references/03-testing.md |
| 4. Bounded Autonomy | peach-setup-ui-proto/references/04-bounded-autonomy.md |
Record the list of missing sections.
Step 3: Generate a change plan
Present the change plan to the user:
CLAUDE.md changes:
- Duplicate sections to remove (content already in AGENTS.md)
- Final estimated line count
AGENTS.md changes:
- List of missing sections + summary of content to add
- Confirm the overall 4-section structure
- Outdated operational sections to remove from the existing AGENTS.md (skills, screen types, component catalog, planner workflow)
Delete cursor rules (if present):
- List of files/directories to delete
- Reason for deletion: "Proceed with work based on the base guidelines (AGENTS.md) + skill base. cursor rules are no longer used"
Step 4: User confirmation
Obtain the user's consent for the change plan. If there are modification requests, incorporate them.
Step 5: Apply
Apply the changes after approval:
-
Organize CLAUDE.md
- Remove sections duplicating AGENTS.md
- Preserve project-specific guidelines (design system, special settings, etc.)
- Keep within 20 lines
-
Create or update AGENTS.md
- Compose 4 sections by combining references per section
- No AGENTS.md → generate the whole thing by combining 4 references
- AGENTS.md exists → extract only missing/mismatched sections from references and add/modify them
- Remove outdated operational sections from the existing AGENTS.md
{모듈구조}→ls -d src/modules*/replace with the result
-
Delete cursor rules (if present)
- root
.cursor/rules/directory deletion - root
.cursorrulesfile deletion
- root
Step 6: Verify completion
Output the application results:
- CLAUDE.md line count before/after
- List of sections added/updated in AGENTS.md
- List of outdated operational sections removed from AGENTS.md
- List of deleted cursor rules files
AGENTS.md minimization principles
When creating or supplementing AGENTS.md anew, apply the principles below.
Core: "Keep only what the guide code cannot say." Do not separately consider the skill-unused case.
Keep (4 categories):
| Category | Content |
|---|---|
| Prohibitions | _commonimport only, no unnecessary optional/null/undefined for core domain types, no isLoading |
| Design philosophy | Mock mode principles, fully independent domains, API calls via Store |
| Conventions | 4 naming types (snake_case/kebab-case/PascalCase/camelCase), Pinia Option API, computed wrapping, kebab-case components |
| Pointers | Guide code paths, quality verification commands, common component paths (_common/components/) |
Remove:
- Content inferable from the guide code → replace with guide code pointers
- Rules that the linter (ESLint) can catch
- Code examples →
파일 경로 참조replace with 1 line - Full list of common components →
_common/components/replace with path pointers
Target size: 70~90줄
CLAUDE.md standard template
Organize the target project's CLAUDE.md in the format below. Preserve project-specific instructions in a separate section.
# {프로젝트명}
{한 줄 설명}
## 규칙 참조
모든 개발 규칙은 @AGENTS.md 를 참조하라.
## 세션 시작
`git status && git branch`로 현재 상태를 확인하세요.
## 가이드 코드
코드 생성 = **가이드 코드 참조** → 도메인 분석 → Bounded Autonomy 범위 내 적응
- Frontend: `src/modules/test-data/`
Core principles
- CLAUDE.md는 Within 20 lines keep
- Remove sections that duplicate AGENTS.md ("coding rules", "frontend guidelines", etc.)
- Preserve project-specific instructions (design system, special environment variables, etc.) in a separate section
Completion criteria checklist
Basic:
- CLAUDE.md is organized within 20 lines
- Duplicate content from AGENTS.md has been removed from CLAUDE.md
- AGENTS.md is composed of 4 sections (common, frontend, test, BA)
- AGENTS.md is in the 70–90 line range
- Project-specific instructions are preserved
Additional:
- Mock mode principles specified in AGENTS.md
- Tech stack (Vue 3/Pinia/NuxtUI v4/TailwindCSS v4) accurately reflected
- references structure is correct (01, 02, 03, 04)
- cursor rules deleted (if they existed)