peach-setup-harness

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

peach-setup-harness — 하네스 시스템 설정

peach-setup-harness — harness系统设置

대상 프로젝트의 CLAUDE.md와 AGENTS.md를 하네스 시스템에 맞게 설정한다. CLAUDE.md는 20줄 이내 최소 진입점, AGENTS.md는 70~90줄 핵심 규칙.
将目标项目的CLAUDE.md和AGENTS.md按照harness系统要求配置。CLAUDE.md为20行以内的最小入口点,AGENTS.md为70~90行的核心规则。

페르소나

角色定位

하네스 시스템 설정 전문가. CLAUDE.md에서 AGENTS.md와 중복되는 내용을 제거하고, AGENTS.md 5개 섹션을 점검하여 누락 시 보완한다. cursor rules는 삭제한다.

harness系统配置专家。移除CLAUDE.md中与AGENTS.md重复的内容,检查AGENTS.md的5个章节,如有缺失则补充。删除cursor rules相关文件。

전제조건

前置条件

  • 대상 프로젝트 루트에서 실행 (peach-harness 자체가 아닌 대상 프로젝트)
  • peach-harness 스킬이 설치되어 있어야 함

  • 目标项目根目录下执行(不是peach-harness本身的目录,是目标项目目录)
  • 必须已安装peach-harness skill

Workflow

工作流程

Step 1: 현재 상태 분석

Step 1: 当前状态分析

다음을 확인한다:
bash
undefined
确认以下内容:
bash
undefined

CLAUDE.md 존재 여부 + 내용

CLAUDE.md 존재 여부 + 내용

cat CLAUDE.md 2>/dev/null || echo "CLAUDE.md 없음"
cat CLAUDE.md 2>/dev/null || echo "CLAUDE.md 없음"

AGENTS.md 존재 여부 + 내용

AGENTS.md 존재 여부 + 내용

cat AGENTS.md 2>/dev/null || echo "AGENTS.md 없음"
cat AGENTS.md 2>/dev/null || echo "AGENTS.md 없음"

프로젝트 구조 감지

프로젝트 구조 감지

ls -d api/ front/ 2>/dev/null || echo "모노레포 아님"
ls -d api/ front/ 2>/dev/null || echo "모노레포 아님"

Controller 프레임워크 감지 (Koa vs Elysia)

Controller 프레임워크 감지 (Koa vs Elysia)

head -3 api/src/modules/test-data/controller/test-data.controller.ts 2>/dev/null || echo "controller 없음"
head -3 api/src/modules/test-data/controller/test-data.controller.ts 2>/dev/null || echo "controller 없음"

DAO 라이브러리 감지 (bunqldb vs sql-template-strings)

DAO 라이브러리 감지 (bunqldb vs sql-template-strings)

head -5 api/src/modules/test-data/dao/test-data.dao.ts 2>/dev/null || echo "dao 없음"
head -5 api/src/modules/test-data/dao/test-data.dao.ts 2>/dev/null || echo "dao 없음"

DB 종류 감지

DB 종류 감지

grep -i "host|database|mysql|postgres" api/env.local.yml 2>/dev/null | head -5 || echo "env.local.yml 없음"
grep -i "host|database|mysql|postgres" api/env.local.yml 2>/dev/null | head -5 || echo "env.local.yml 없음"

cursor rules 존재 여부

cursor rules 존재 여부

ls api/.cursor/rules/ 2>/dev/null && echo "api cursor rules 존재" || echo "api cursor rules 없음" ls front/.cursor/rules/ 2>/dev/null && echo "front cursor rules 존재" || echo "front 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 없음"

분석 결과를 정리:
- CLAUDE.md: 존재 여부, 현재 줄 수, AGENTS.md와 중복되는 섹션 목록
- AGENTS.md: 존재 여부, 5개 섹션 존재 여부
- 프로젝트 유형: `api/ + front/` 모노레포 / 단독 `api/` / 단독 `front/`
- Controller 프레임워크: Koa (routing-controllers) 또는 Elysia (api/ 없으면 해당 없음)
- DB 종류: MySQL 또는 PostgreSQL (api/ 없으면 해당 없음)
- cursor rules: 존재 여부 및 파일 목록
ls api/.cursor/rules/ 2>/dev/null && echo "api cursor rules 존재" || echo "api cursor rules 없음" ls front/.cursor/rules/ 2>/dev/null && echo "front cursor rules 존재" || echo "front 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 없음"

整理分析结果:
- CLAUDE.md:是否存在、当前行数、与AGENTS.md重复的章节列表
- AGENTS.md:是否存在、5个核心章节是否齐全
- 项目类型:`api/ + front/` 单体仓库 / 仅 `api/` / 仅 `front/`
- Controller框架:Koa (routing-controllers) 或 Elysia(无api/目录则不适用)
- DB类型:MySQL 或 PostgreSQL(无api/目录则不适用)
- cursor rules:是否存在及对应文件列表

Step 2: AGENTS.md 5개 섹션 점검

Step 2: AGENTS.md 5个章节检查

AGENTS.md가 존재하는 경우, 아래 5개 섹션이 있는지 확인한다:
bash
grep -l "공통 원칙\|_common.*import" AGENTS.md 2>/dev/null && echo "§1.공통원칙 존재" || echo "§1.공통원칙 누락"
grep -l "백엔드 규칙\|ErrorHandler" AGENTS.md 2>/dev/null && echo "§2.백엔드 존재" || echo "§2.백엔드 누락"
grep -l "프론트엔드 규칙\|computed" AGENTS.md 2>/dev/null && echo "§3.프론트엔드 존재" || echo "§3.프론트엔드 누락"
grep -l "테스트\|TDD" AGENTS.md 2>/dev/null && echo "§4.테스트 존재" || echo "§4.테스트 누락"
grep -l "Bounded Autonomy\|Must Follow" AGENTS.md 2>/dev/null && echo "§5.BA 존재" || echo "§5.BA 누락"
누락 섹션 발견 시 아래 references를 소스로 사용한다:
섹션소스 파일
1. 공통 원칙
peach-setup-harness/references/01-common.md
2. 백엔드 규칙 (Koa)
peach-setup-harness/references/02-backend-koa.md
2. 백엔드 규칙 (Elysia)
peach-setup-harness/references/02-backend-elysia.md
3. 프론트엔드 규칙
peach-setup-harness/references/03-frontend.md
4. 테스트 및 품질
peach-setup-harness/references/04-testing.md
5. Bounded Autonomy
peach-setup-harness/references/05-bounded-autonomy.md
Koa/Elysia 분기: 02번 파일 선택만으로 처리
  • Koa →
    01 + 02-backend-koa + 03 + 04 + 05
  • Elysia →
    01 + 02-backend-elysia + 03 + 04 + 05
Elysia 감지 시 추가 확인:
bash
grep -l "Plugin System\|try-catch 금지" AGENTS.md 2>/dev/null && echo "Elysia 규칙 존재" || echo "Elysia 규칙 누락"
누락 섹션 목록을 기록한다.
如果AGENTS.md存在,确认是否包含以下5个章节:
bash
grep -l "공통 원칙\|_common.*import" AGENTS.md 2>/dev/null && echo "§1.공통원칙 존재" || echo "§1.공통원칙 누락"
grep -l "백엔드 규칙\|ErrorHandler" AGENTS.md 2>/dev/null && echo "§2.백엔드 존재" || echo "§2.백엔드 누락"
grep -l "프론트엔드 규칙\|computed" AGENTS.md 2>/dev/null && echo "§3.프론트엔드 존재" || echo "§3.프론트엔드 누락"
grep -l "테스트\|TDD" AGENTS.md 2>/dev/null && echo "§4.테스트 존재" || echo "§4.테스트 누락"
grep -l "Bounded Autonomy\|Must Follow" AGENTS.md 2>/dev/null && echo "§5.BA 존재" || echo "§5.BA 누락"
发现缺失章节时,使用以下参考文件作为补充来源:
章节源文件
1. 通用原则
peach-setup-harness/references/01-common.md
2. 后端规则 (Koa)
peach-setup-harness/references/02-backend-koa.md
2. 后端规则 (Elysia)
peach-setup-harness/references/02-backend-elysia.md
3. 前端规则
peach-setup-harness/references/03-frontend.md
4. 测试与质量
peach-setup-harness/references/04-testing.md
5. Bounded Autonomy
peach-setup-harness/references/05-bounded-autonomy.md
Koa/Elysia分支处理:仅通过选择02号文件即可完成适配
  • Koa →
    01 + 02-backend-koa + 03 + 04 + 05
  • Elysia →
    01 + 02-backend-elysia + 03 + 04 + 05
检测到Elysia时额外确认:
bash
grep -l "Plugin System\|try-catch 금지" AGENTS.md 2>/dev/null && echo "Elysia 규칙 존재" || echo "Elysia 규칙 누락"
记录缺失的章节列表。

Step 3: 변경 계획 생성

Step 3: 生成变更计划

사용자에게 변경 계획을 제시한다:
CLAUDE.md 변경:
  • 제거할 중복 섹션 (AGENTS.md에 이미 있는 내용)
  • 최종 예상 줄 수
AGENTS.md 변경:
  • 누락된 섹션 목록 + 추가할 내용 요약
  • 전체 5개 섹션 구성 확인
cursor rules 삭제 (존재하는 경우):
  • 삭제 대상 파일/디렉토리 목록
  • 삭제 사유: "기본 지침(AGENTS.md) + 스킬 베이스로 작업 진행. cursor rules는 더 이상 사용하지 않음"
向用户提交变更计划:
CLAUDE.md变更:
  • 要删除的重复章节(AGENTS.md中已存在的内容)
  • 最终预计行数
AGENTS.md变更:
  • 缺失的章节列表 + 待补充内容摘要
  • 确认5个核心章节的整体构成
cursor rules删除(如果存在):
  • 待删除的文件/目录列表
  • 删除原因:「基于通用规则(AGENTS.md) + skill基座开展工作,不再使用cursor rules」

Step 4: 사용자 확인

Step 4: 用户确认

변경 계획에 대해 사용자 동의를 받는다. 수정 요청이 있으면 반영한다.
获取用户对变更计划的同意,如有修改需求则同步调整。

Step 5: 적용

Step 5: 执行变更

승인 후 변경을 적용한다:
  1. CLAUDE.md 정리
    • AGENTS.md와 중복되는 섹션 제거
    • 프로젝트별 고유 지침은 보존 (Electron IPC, 특수 설정 등)
    • 20줄 이내 유지
  2. AGENTS.md 생성 또는 업데이트
    • 섹션별 references를 조합하여 5개 섹션 구성
    • Koa/Elysia 분기는 02번 파일 선택만으로 처리
    • AGENTS.md 없음 → 5개 references 조합하여 전체 생성
    • AGENTS.md 있음 → 누락/불일치 섹션만 references에서 추출하여 추가/수정
  3. cursor rules 삭제 (존재하는 경우)
    • api/.cursor/rules/
      디렉토리 삭제
    • front/.cursor/rules/
      디렉토리 삭제
    • 루트
      .cursor/rules/
      디렉토리 삭제
    • 루트
      .cursorrules
      파일 삭제
获得审批后应用变更:
  1. 整理CLAUDE.md
    • 删除与AGENTS.md重复的章节
    • 保留项目特有规则(如Electron IPC、特殊配置等)
    • 保持20行以内的规模
  2. 生成或更新AGENTS.md
    • 组合各章节参考文件,构成5个核心章节
    • Koa/Elysia适配仅通过选择02号文件完成
    • 无AGENTS.md → 组合5个参考文件生成完整文档
    • 已有AGENTS.md → 仅从参考文件中提取缺失/不匹配的章节进行补充/修改
  3. 删除cursor rules(如果存在)
    • 删除
      api/.cursor/rules/
      目录
    • 删除
      front/.cursor/rules/
      目录
    • 删除根目录
      .cursor/rules/
      目录
    • 删除根目录
      .cursorrules
      文件

Step 6: 완료 확인

Step 6: 完成确认

적용 결과를 출력한다:
  • CLAUDE.md 변경 전/후 줄 수
  • AGENTS.md 추가/업데이트된 섹션 목록
  • 삭제된 cursor rules 파일 목록

输出变更结果:
  • CLAUDE.md变更前后的行数
  • AGENTS.md新增/更新的章节列表
  • 已删除的cursor rules文件列表

AGENTS.md 최소화 원칙

AGENTS.md精简原则

AGENTS.md를 새로 생성하거나 보완할 때 아래 원칙을 적용한다.
핵심: "가이드 코드가 말 못하는 것만 남긴다." 스킬 미사용 케이스를 별도로 고려하지 않는다.
유지 (4가지 카테고리):
카테고리내용
금지사항
_common
만 import, FK 금지, 옵셔널/null/undefined 금지, try-catch 금지(Elysia), isLoading 금지
설계 철학에러 처리(200+success:false / ErrorHandler), 완전 독립 도메인, TDD/실DB/모킹 금지
컨벤션네이밍 4종(snake_case/kebab-case/PascalCase/camelCase), PK
seq
접미사, 감사 칼럼, DB Boolean CHAR(1)
포인터가이드 코드 경로, 품질 검증 명령어, DB 마이그레이션 명령어
제거:
  • 가이드 코드에서 추론 가능한 내용 → 가이드 코드 포인터로 대체
  • 린터(Biome/ESLint)가 잡을 수 있는 규칙
  • 코드 예시 →
    파일 경로 참조
    1줄로 대체
목표 크기: 70~90줄

新建或补充AGENTS.md时遵循以下原则:
核心:「仅保留示例代码无法说明的内容」,不单独考虑未使用skill的场景。
保留内容(4类):
类别内容
禁止事项仅允许import
_common
、禁止使用外键、禁止使用optional/null/undefined、Elysia环境禁止try-catch、禁止使用isLoading
设计理念错误处理(200+success:false / ErrorHandler)、完全独立域、禁止TDD/真实数据库/ Mock
开发规范4种命名规则(snake_case/kebab-case/PascalCase/camelCase)、PK使用
seq
后缀、审计字段、数据库布尔值使用CHAR(1)存储
指引入口示例代码路径、质量校验命令、数据库迁移命令
移除内容:
  • 可通过示例代码推断的内容 → 替换为示例代码路径指引
  • 可被linter(Biome/ESLint)检测的规则
  • 代码示例 → 替换为「参考文件路径」一行说明
目标规模:70~90行

CLAUDE.md 표준 템플릿

CLAUDE.md标准模板

대상 프로젝트의 CLAUDE.md를 아래 형식으로 정리한다. 프로젝트별 고유 지침은 별도 섹션으로 보존한다.
markdown
undefined
按照以下格式整理目标项目的CLAUDE.md,项目特有规则可单独保留为独立章节。
markdown
undefined

{프로젝트명}

{项目名}

{한 줄 설명}
{项目一行说明}

규칙 참조

规则参考

모든 개발 규칙은 @AGENTS.md 를 참조하라.
所有开发规则请参考 @AGENTS.md。

세션 시작

会话启动

git status && git branch
로 현재 상태를 확인하세요.
请执行
git status && git branch
确认当前状态。

가이드 코드

示例代码

코드 생성 = 가이드 코드 참조 → 도메인 분석 → Bounded Autonomy 범위 내 적응
  • Backend:
    api/src/modules/test-data/
  • Frontend:
    front/src/modules/test-data/
undefined
代码生成 = 参考示例代码 → 域分析 → 在Bounded Autonomy范围内适配
  • Backend:
    api/src/modules/test-data/
  • Frontend:
    front/src/modules/test-data/
undefined

핵심 원칙

核心原则

  • CLAUDE.md는 20줄 이내 유지
  • AGENTS.md와 중복되는 섹션은 제거 ("Claude 특화 지침", "코딩 규칙" 등)
  • 프로젝트별 고유 지침(Electron IPC, 특수 환경변수 등)은 별도 섹션으로 보존
  • "가이드 코드" 섹션:
    • 모노레포(api/+front/):
      Backend: api/src/modules/test-data/
      +
      Frontend: front/src/modules/test-data/
    • 단독 front/:
      Frontend: front/src/modules/test-data/

  • CLAUDE.md保持20行以内的规模
  • 删除与AGENTS.md重复的章节(如「Claude专属规则」、「编码规范」等)
  • 项目特有规则(如Electron IPC、特殊环境变量等)单独保留为独立章节
  • 「示例代码」章节:
    • 单体仓库(api/+front/):保留
      Backend: api/src/modules/test-data/
      +
      Frontend: front/src/modules/test-data/
    • 仅前端项目:仅保留
      Frontend: front/src/modules/test-data/

완료 조건 체크리스트

完成条件检查清单

기본:
  • CLAUDE.md가 20줄 이내로 정리됨
  • CLAUDE.md에서 AGENTS.md 중복 내용이 제거됨
  • AGENTS.md가 5개 섹션(공통, 백엔드, 프론트엔드, 테스트, BA)으로 구성됨
  • AGENTS.md가 70~90줄 범위
  • 프로젝트별 고유 지침이 보존됨
추가:
  • Elysia 프로젝트인 경우 Elysia 전용 항목이 포함됨
  • 기술 스택이 정확히 반영됨
  • references 구조가 올바름 (01, 02-koa/02-elysia, 03, 04, 05)
  • cursor rules 삭제됨 (존재했던 경우)
  • 프로젝트 환경(Koa/Elysia, DB종류)에 맞는 내용으로 작성됨
基础项:
  • CLAUDE.md已整理为20行以内
  • CLAUDE.md中与AGENTS.md重复的内容已删除
  • AGENTS.md由5个章节(通用、后端、前端、测试、BA)构成
  • AGENTS.md行数在70~90行范围内
  • 项目特有规则已保留
附加项:
  • Elysia项目已包含Elysia专属规则
  • 技术栈已准确反映
  • 参考文件结构正确(01、02-koa/02-elysia、03、04、05)
  • 如存在cursor rules已全部删除
  • 内容适配项目环境(Koa/Elysia、数据库类型)