From 60caa5c4c27b054ccbe1f98820673f3a49ae3363 Mon Sep 17 00:00:00 2001 From: toki Date: Thu, 21 May 2026 19:18:31 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20sync-push=20=EA=B3=B5=ED=86=B5=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=B3=80=EA=B2=BD=20=EC=97=86=EC=9D=8C=20?= =?UTF-8?q?=EC=8B=9C=20=EB=B2=84=EC=A0=84=20=EA=B0=B1=EC=8B=A0/=EC=BB=A4?= =?UTF-8?q?=EB=B0=8B=20=EA=B1=B4=EB=84=88=EB=9B=B0=EA=B8=B0=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - sync.sh에 common_differs 함수 추가하여 공통 파일 변경 여부 확인 - 공통 파일(rules/common, skills/common, bin) 변경 없이 .version만 다른 경우 건너뛰기 - sync-push SKILL.md에 해당 동작 설명 추가 --- agent-ops/bin/sync.sh | 22 ++++++++++++++++++++++ agent-ops/skills/common/sync-push/SKILL.md | 1 + 2 files changed, 23 insertions(+) diff --git a/agent-ops/bin/sync.sh b/agent-ops/bin/sync.sh index 790bc1f..75b33fa 100755 --- a/agent-ops/bin/sync.sh +++ b/agent-ops/bin/sync.sh @@ -71,6 +71,22 @@ sync_common() { sync_folder "$src/bin" "$dst/bin" } +common_differs() { + local src="$1" dst="$2" + local path + + for path in "rules/common" "skills/common" "bin"; do + if [[ ! -d "$src/$path" || ! -d "$dst/$path" ]]; then + return 0 + fi + if ! diff -qr "$src/$path" "$dst/$path" >/dev/null; then + return 0 + fi + done + + return 1 +} + create_project_agent_ops_dirs() { local agent_ops_dir="$1" mkdir -p "$agent_ops_dir/rules/project/domain" @@ -277,6 +293,12 @@ SRC_VER="$(cat "$SRC_AO/.version" 2>/dev/null || echo "0.0.0")" DST_VER="$(cat "$DST_AO/.version" 2>/dev/null || echo "0.0.0")" echo " 현재 버전: $SRC_VER | framework 버전: $DST_VER" +if ! common_differs "$SRC_AO" "$DST_AO"; then + echo " 공통 파일 변경 없음: .version 차이는 무시하고 버전 갱신/커밋을 건너뜀" + echo -e "${GREEN}✓ 완료 (변경 없음)${RESET}" + exit 0 +fi + if version_gt "$DST_VER" "$SRC_VER"; then echo -e "${RED}⚠ 버전 충돌: framework($DST_VER) > current($SRC_VER)${RESET}" echo -e "${YELLOW} 먼저 sync-pull로 내려받은 뒤 재시도하세요.${RESET}" diff --git a/agent-ops/skills/common/sync-push/SKILL.md b/agent-ops/skills/common/sync-push/SKILL.md index 390437b..424f7bb 100644 --- a/agent-ops/skills/common/sync-push/SKILL.md +++ b/agent-ops/skills/common/sync-push/SKILL.md @@ -26,6 +26,7 @@ description: 현재 프로젝트의 agent-ops를 agentic-framework로 올리거 1. 현재 프로젝트의 **상위 폴더(`../`)** 에 `agentic-framework` 폴더가 있는지 확인한다 (현재 폴더 내부가 아님) 2. **있으면**: `agent-ops/bin/sync.sh` 실행 또는 `agent-ops/bin/sync.sh agentic-framework` 실행 3. **없으면**: 사용자에게 agentic-framework 경로 입력을 안내하고, 입력받은 경로로 실행 +4. 공통 관리 파일 변경 없이 `agent-ops/.version`만 다른 경우 `sync.sh`는 버전 갱신과 commit/push를 건너뛴다 ### 현 프로젝트가 agentic-framework인 경우 (`.agent-ops-source` 있음)