diff --git a/agent-ops/bin/sync.sh b/agent-ops/bin/sync.sh index 790bc1f..3c4b406 100755 --- a/agent-ops/bin/sync.sh +++ b/agent-ops/bin/sync.sh @@ -5,6 +5,7 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" AGENT_OPS_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" PROJECT_ROOT="$(cd "$AGENT_OPS_DIR/.." && pwd)" +SOURCE_REPO_DEFAULT="${AGENT_OPS_SOURCE_REPO:-agentic-framework}" # ── 색상 ───────────────────────────────────────────────────────────────────── RED='\033[0;31m'; YELLOW='\033[1;33m'; GREEN='\033[0;32m'; RESET='\033[0m' @@ -29,6 +30,39 @@ resolve_target() { [[ -d "$sibling" ]] && echo "$sibling" || echo "" } +find_default_source_repo() { + local explicit="${AGENT_OPS_SOURCE_REPO:-}" + local target="" + + if [[ -n "$explicit" ]]; then + resolve_target "$explicit" + return + fi + + target="$(resolve_target "$SOURCE_REPO_DEFAULT")" + if [[ -n "$target" && -f "$target/.agent-ops-source" ]]; then + echo "$target" + return + fi + + local parent + local -a source_repos + parent="$(dirname "$PROJECT_ROOT")" + mapfile -t source_repos < <( + find "$parent" -mindepth 1 -maxdepth 1 -type d | sort | while IFS= read -r candidate; do + local resolved + resolved="$(cd "$candidate" && pwd)" + [[ "$resolved" == "$PROJECT_ROOT" ]] && continue + [[ -f "$resolved/.agent-ops-source" ]] || continue + echo "$resolved" + done + ) + + if [[ "${#source_repos[@]}" -eq 1 ]]; then + echo "${source_repos[0]}" + fi +} + # ── 버전 비교: v1 > v2 이면 0 반환 ─────────────────────────────────────────── version_gt() { local v1="$1" v2="$2" @@ -97,6 +131,7 @@ discover_agent_ops_targets() { local resolved resolved="$(cd "$candidate" && pwd)" [[ "$resolved" == "$PROJECT_ROOT" ]] && continue + [[ ! -f "$resolved/.agent-ops-source" ]] || continue [[ -d "$resolved/agent-ops" ]] || continue echo "$resolved" done @@ -139,7 +174,7 @@ commit_and_push_agent_ops_scope() { ) } -sync_framework_to_target() { +sync_source_to_target() { local target="$1" local dst_ao="$target/agent-ops" local src_ver @@ -173,10 +208,11 @@ usage() { echo "사용법: $0 [--pull] [target]" echo "" echo " (기본) push 동기화" - echo " --pull target(agentic-framework) → 현재 프로젝트 로 pull" + echo " --pull target(source repo) → 현재 프로젝트 로 pull" echo "" echo " target: 폴더명 (동일 레벨 탐색) | 상대경로 | 절대경로" - echo " agentic-framework에서 target 생략 시 상위 폴더의 agent-ops 적용 프로젝트 전체 동기화" + echo " source repo에서 target 생략 시 상위 폴더의 agent-ops 적용 프로젝트 전체 동기화" + echo " 일반 프로젝트에서 target 생략 시 AGENT_OPS_SOURCE_REPO 또는 sibling source repo(.agent-ops-source)를 사용" } # ───────────────────────────────────────────────────────────────────────────── @@ -189,53 +225,55 @@ fi TARGET_INPUT="${1:-}" SRC_AO="$AGENT_OPS_DIR" -IS_FRAMEWORK="$([[ -f "$PROJECT_ROOT/.agent-ops-source" ]] && echo "1" || echo "0")" +IS_SOURCE_REPO="$([[ -f "$PROJECT_ROOT/.agent-ops-source" ]] && echo "1" || echo "0")" -# ── pull 모드: agentic-framework → 현재 프로젝트 ───────────────────────────── +# ── pull 모드: source repo → 현재 프로젝트 ───────────────────────────────── if [[ "$PULL_MODE" == "1" ]]; then - if [[ -z "$TARGET_INPUT" ]]; then - usage; exit 1 + if [[ "$IS_SOURCE_REPO" == "1" ]]; then + echo -e "${RED}Error: source repo에서는 --pull을 사용할 수 없습니다.${RESET}" + exit 1 + fi + + if [[ -z "$TARGET_INPUT" ]]; then + TARGET="$(find_default_source_repo)" + else + TARGET="$(resolve_target "$TARGET_INPUT")" fi - TARGET="$(resolve_target "$TARGET_INPUT")" if [[ -z "$TARGET" ]]; then - echo -e "${RED}Error: 대상을 찾을 수 없습니다: $TARGET_INPUT${RESET}" + echo -e "${RED}Error: source repo를 찾을 수 없습니다: ${TARGET_INPUT:-$SOURCE_REPO_DEFAULT}${RESET}" exit 1 fi DST_AO="$TARGET/agent-ops" - if [[ "$IS_FRAMEWORK" == "1" ]]; then - echo -e "${RED}Error: agentic-framework에서는 --pull을 사용할 수 없습니다.${RESET}" - exit 1 - fi if [[ ! -f "$TARGET/.agent-ops-source" ]]; then - echo -e "${RED}Error: target이 agentic-framework가 아닙니다 (.agent-ops-source 없음)${RESET}" + echo -e "${RED}Error: target이 source repo가 아닙니다 (.agent-ops-source 없음)${RESET}" exit 1 fi 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 "▶ $(basename "$TARGET") → $(basename "$PROJECT_ROOT") (pull)" - echo " 현재 버전: $SRC_VER | framework 버전: $DST_VER" + echo " 현재 버전: $SRC_VER | source 버전: $DST_VER" sync_common "$DST_AO" "$SRC_AO" cp "$DST_AO/.version" "$SRC_AO/.version" apply_agent_ops_entry_files "$DST_AO/rules/common/rules.md" "$PROJECT_ROOT" cd "$PROJECT_ROOT" git add agent-ops/rules/common agent-ops/skills/common agent-ops/bin agent-ops/.version \ "${AGENT_OPS_ENTRY_FILES[@]}" - git commit -m "sync: pull from agentic-framework v$DST_VER" + git commit -m "sync: pull from $(basename "$TARGET") v$DST_VER" git push echo -e "${GREEN}✓ 완료 (pull v$DST_VER)${RESET}" exit 0 fi -# ── agentic-framework에서 다른 프로젝트로 ──────────────────────────────────── -if [[ "$IS_FRAMEWORK" == "1" ]]; then +# ── source repo에서 다른 프로젝트로 ───────────────────────────────────────── +if [[ "$IS_SOURCE_REPO" == "1" ]]; then if [[ -n "$TARGET_INPUT" ]]; then TARGET="$(resolve_target "$TARGET_INPUT")" if [[ -z "$TARGET" ]]; then echo -e "${RED}Error: 대상을 찾을 수 없습니다: $TARGET_INPUT${RESET}" exit 1 fi - sync_framework_to_target "$TARGET" + sync_source_to_target "$TARGET" else mapfile -t TARGETS < <(discover_agent_ops_targets) if [[ "${#TARGETS[@]}" -eq 0 ]]; then @@ -245,7 +283,7 @@ if [[ "$IS_FRAMEWORK" == "1" ]]; then STATUS=0 for TARGET in "${TARGETS[@]}"; do - if ! sync_framework_to_target "$TARGET"; then + if ! sync_source_to_target "$TARGET"; then STATUS=1 fi done @@ -254,14 +292,15 @@ if [[ "$IS_FRAMEWORK" == "1" ]]; then exit 0 fi -# ── 일반 프로젝트에서 agentic-framework로 (push) ───────────────────────────── +# ── 일반 프로젝트에서 source repo로 (push) ────────────────────────────────── if [[ -z "$TARGET_INPUT" ]]; then - TARGET_INPUT="agentic-framework" + TARGET="$(find_default_source_repo)" +else + TARGET="$(resolve_target "$TARGET_INPUT")" fi -TARGET="$(resolve_target "$TARGET_INPUT")" if [[ -z "$TARGET" ]]; then - echo -e "${RED}Error: 대상을 찾을 수 없습니다: $TARGET_INPUT${RESET}" + echo -e "${RED}Error: source repo를 찾을 수 없습니다: ${TARGET_INPUT:-$SOURCE_REPO_DEFAULT}${RESET}" exit 1 fi DST_AO="$TARGET/agent-ops" @@ -269,16 +308,16 @@ DST_AO="$TARGET/agent-ops" echo "▶ $(basename "$PROJECT_ROOT") → $(basename "$TARGET")" if [[ ! -f "$TARGET/.agent-ops-source" ]]; then - echo -e "${RED}Error: target이 agentic-framework가 아닙니다 (.agent-ops-source 없음)${RESET}" + echo -e "${RED}Error: target이 source repo가 아닙니다 (.agent-ops-source 없음)${RESET}" exit 1 fi 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" +echo " 현재 버전: $SRC_VER | source 버전: $DST_VER" if version_gt "$DST_VER" "$SRC_VER"; then - echo -e "${RED}⚠ 버전 충돌: framework($DST_VER) > current($SRC_VER)${RESET}" + echo -e "${RED}⚠ 버전 충돌: source($DST_VER) > current($SRC_VER)${RESET}" echo -e "${YELLOW} 먼저 sync-pull로 내려받은 뒤 재시도하세요.${RESET}" exit 1 fi @@ -289,6 +328,6 @@ echo "$NEW_VER" > "$SRC_AO/.version" echo "$NEW_VER" > "$DST_AO/.version" commit_and_push_agent_ops_scope "$TARGET" "sync: from $(basename "$PROJECT_ROOT") v$NEW_VER" -commit_and_push_agent_ops_scope "$PROJECT_ROOT" "sync: to agentic-framework v$NEW_VER" +commit_and_push_agent_ops_scope "$PROJECT_ROOT" "sync: to $(basename "$TARGET") v$NEW_VER" echo -e "${GREEN}✓ 완료 (v$SRC_VER → v$NEW_VER)${RESET}" diff --git a/agent-ops/skills/common/code-review/SKILL.md b/agent-ops/skills/common/code-review/SKILL.md index 559239f..35b04dd 100644 --- a/agent-ops/skills/common/code-review/SKILL.md +++ b/agent-ops/skills/common/code-review/SKILL.md @@ -15,6 +15,8 @@ plan skill -> implementation -> code-review skill +----- issues found: new routed plan/review files ``` +If this skill is invoked, the review finalization contract is mandatory. Do not leave an ad hoc review comment only; every selected active review must end in exactly one recorded next state. + ## Core Loop Rules - Trigger: Korean or English active-task review requests, including `리뷰 진행해` and `리뷰해줘`, must use this skill when `agent-task/*/CODE_REVIEW-*-G??.md` exists. diff --git a/agent-ops/skills/common/create-skill/SKILL.md b/agent-ops/skills/common/create-skill/SKILL.md index 07bb36c..3fc168e 100644 --- a/agent-ops/skills/common/create-skill/SKILL.md +++ b/agent-ops/skills/common/create-skill/SKILL.md @@ -31,7 +31,8 @@ description: 새로운 SKILL.md 파일을 생성하기 위한 범용 스킬 ## 먼저 확인할 것 - [ ] `agent-ops/skills/common/` 및 `agent-ops/skills/project/` 하위에 동일 이름의 디렉터리가 이미 존재하는지 확인 -- [ ] `agent-ops/rules/common/rules.md` 및 `agent-ops/rules/project/rules.md` 에 이미 유사한 라우팅 항목이 있는지 확인 +- [ ] `agent-ops/skills/common/router.md` 및 `agent-ops/rules/project/rules.md` 에 이미 유사한 라우팅 항목이 있는지 확인 +- [ ] 공통 스킬을 생성하는 경우, 새 요청 범주가 `agent-ops/rules/common/rules.md`의 router 로딩 목록에 이미 포함되는지 확인 - [ ] `agent-ops/skills/common/_templates/skill-template.md` 를 읽어 최신 템플릿 형식 파악 ## 실행 절차 @@ -56,7 +57,8 @@ description: 새로운 SKILL.md 파일을 생성하기 위한 범용 스킬 - 절차는 구체적이되 지나치게 세부 구현을 기술하지 않는다 4. **라우팅 업데이트** - - `.agent-ops-source` 마커가 **있으면** (공통 관리 레포): `agent-ops/rules/common/rules.md`에 라우팅 항목 추가 + - `.agent-ops-source` 마커가 **있으면** (공통 관리 레포): `agent-ops/skills/common/router.md`에 라우팅 항목 추가 + - 공통 스킬의 요청 범주가 `agent-ops/rules/common/rules.md`의 router 로딩 목록에 없을 때만 해당 범주를 추가한다 - `.agent-ops-source` 마커가 **없으면** (타겟 프로젝트): `agent-ops/rules/project/rules.md`의 프로젝트 스킬 라우터 섹션에 라우팅 항목 추가 - 이 skill이 속할 라우팅 축(구조 분석/코드 변경/흐름 추적 등)을 판단한다 - 기존 라우팅 구조를 깨지 않는다 @@ -83,7 +85,7 @@ description: 새로운 SKILL.md 파일을 생성하기 위한 범용 스킬 - [ ] `agent-ops/skills/{common|project}//SKILL.md` 파일이 생성되었는가 - [ ] 생성된 파일이 `skill-template.md`의 필수 섹션(목적, 언제 호출할지, 실행 절차, 실행 결과 검증, 출력 형식, 금지 사항)을 포함하는가 - [ ] frontmatter에 name, version, description이 올바르게 기재되었는가 -- [ ] 라우팅 대상 파일에 해당 스킬의 라우팅 항목이 추가되었는가 +- [ ] 공통 스킬이면 `agent-ops/skills/common/router.md`, 프로젝트 스킬이면 `agent-ops/rules/project/rules.md`에 라우팅 항목이 추가되었는가 - 검증 실패 시: 누락된 섹션 또는 라우팅 항목을 사용자에게 알리고 해당 부분만 보완한다 ## 금지 사항 diff --git a/agent-ops/skills/common/init-agent-ops/SKILL.md b/agent-ops/skills/common/init-agent-ops/SKILL.md index 5a9807c..e38a162 100644 --- a/agent-ops/skills/common/init-agent-ops/SKILL.md +++ b/agent-ops/skills/common/init-agent-ops/SKILL.md @@ -8,8 +8,12 @@ description: 프로젝트 상태를 판별하고 agent-ops 기본 스캐폴드 ## 목적 -프로젝트에 Agent-Ops 구조가 없거나 불완전할 때, -현재 프로젝트 상태를 분석하여 다음을 세팅한다. +프로젝트에 Agent-Ops 구조가 없거나 불완전할 때, 공통 scaffold를 배치한 뒤 현재 프로젝트 상태를 분석하여 프로젝트 전용 규칙 초안을 세팅한다. + +`agent-ops/bin/init-agent-ops.sh`는 공통 scaffold와 빈 프로젝트 전용 디렉터리를 만드는 bootstrap 도구다. +이 스킬을 읽은 에이전트는 스크립트 실행 후 프로젝트를 분석하여 `rules/project/rules.md`와 필요한 domain rule 초안을 이어서 작성한다. + +최종적으로 다음 상태를 만든다. 1. 에이전트 진입 파일 2. AI ignore / permission 기본 설정 @@ -41,11 +45,29 @@ description: 프로젝트 상태를 판별하고 agent-ops 기본 스캐폴드 - 기존 구조를 우선한다. - 새 파일 생성은 꼭 필요한 최소 범위로 제한한다. +- 스크립트가 만드는 공통 scaffold와 에이전트가 분석해 작성하는 프로젝트 전용 파일을 구분한다. - 도메인은 발명하지 말고 현재 구조에서 발견한다. - 처음에는 핵심 도메인만 생성한다. - 반복되는 작업만 초기 skill로 만든다. - 불확실한 내용은 후보로 제시한다. +## 실행 책임 구분 + +### init-agent-ops.sh가 수행하는 일 + +- 에이전트 진입 파일 생성 +- AI ignore / permission 기본 설정 +- `agent-ops/bin`, `agent-ops/rules/common`, `agent-ops/skills/common` 복사 +- `agent-ops/rules/project/domain`, `agent-ops/rules/private`, `agent-ops/skills/project` 디렉터리 생성 +- `.gitignore`에 `agent-ops/rules/private/` 추가 + +### 에이전트가 이어서 수행하는 일 + +- 프로젝트 구조를 분석해 `agent-ops/rules/project/rules.md` 생성 +- 필요한 최소 domain rule 초안 생성 +- 반복 작업이 보이는 경우 프로젝트 skill 후보 제안 +- 불확실한 항목은 확정하지 않고 TODO 또는 후보로 남김 + ## 상태 판별 ### 신규 프로젝트 @@ -67,8 +89,8 @@ description: 프로젝트 상태를 판별하고 agent-ops 기본 스캐폴드 | `agent-ops/bin/` | 공통 스크립트 전체 복사 (진입 파일 목록의 단일 기준인 `entry-files.sh` 포함) | | `agent-ops/rules/common/` | 공통 폴더 전체 복사 (수정 금지) | | `agent-ops/skills/common/` | 공통 폴더 전체 복사 (수정 금지) | -| `agent-ops/rules/project/rules.md` | 프로젝트 분석 후 생성 | -| `agent-ops/rules/project/domain//rules.md` | 도메인 분석 후 생성 | +| `agent-ops/rules/project/rules.md` | 스크립트 실행 후 에이전트가 프로젝트 분석으로 생성 | +| `agent-ops/rules/project/domain//rules.md` | 스크립트 실행 후 에이전트가 필요한 최소 도메인만 분석해 생성 | | `agent-ops/rules/private/` | 폴더만 생성 (내용은 개인이 작성) | | `.gitignore`에 `agent-ops/rules/private/` 추가 | git 추적 제외 | | `.geminiignore`, `.aiexclude`, `.cursorignore`, `.clineignore` | `agent-task/archive/**` 한 줄 추가 | @@ -158,7 +180,9 @@ common/rules.md와 내용이 중복되지 않도록 한다. ## 실행 (Execution) -지정한 대상 디렉토리에 agent-ops 스캐폴드를 생성한다. +지정한 대상 디렉토리에 agent-ops 공통 스캐폴드를 생성한다. +이 명령은 프로젝트 전용 `rules/project/rules.md`나 domain rule 본문을 채우지 않는다. +명령 실행 후 아래 실행 절차의 프로젝트 분석 단계를 반드시 이어서 수행한다. ```bash ./agent-ops/bin/init-agent-ops.sh @@ -169,31 +193,29 @@ common/rules.md와 내용이 중복되지 않도록 한다. 1. **상태 판별** - 프로젝트 구조, 모듈 경계, agent-ops 파일 유무를 분석하여 신규/운영중을 판별한다 -2. **에이전트 진입 파일 생성** - - `rules/common/rules.md`를 `agent-ops/bin/entry-files.sh`의 파일 목록으로 프로젝트 루트에 복사한다 +2. **공통 scaffold 생성** + - `./agent-ops/bin/init-agent-ops.sh `를 실행한다 + - 스크립트 결과로 진입 파일, 공통 rules/skills/bin, 빈 project/private 디렉터리가 생성됐는지 확인한다 -3. **AI ignore / permission 기본 설정** - - `.geminiignore`, `.aiexclude`, `.cursorignore`, `.clineignore`에 `agent-task/archive/**`를 추가한다 - - `.claude/settings.json`, `opencode.json`이 없으면 archive 읽기/검색 제외 설정을 생성한다 +3. **스크립트 결과 확인** + - `rules/common/rules.md`가 진입 파일로 복사됐는지 확인한다 + - `.geminiignore`, `.aiexclude`, `.cursorignore`, `.clineignore`에 `agent-task/archive/**`가 추가됐는지 확인한다 + - `.claude/settings.json`, `opencode.json`은 없으면 생성되고, 있으면 수동 병합 안내가 출력됐는지 확인한다 - `agent-task/archive/**` 제외는 `.gitignore`에 추가하지 않는다 -4. **agent-ops 폴더 구조 복사** - - 공통 관리 레포의 `agent-ops/` 공통 폴더(bin, rules/common, skills/common)를 복사한다 - - `agent-ops/.version` 파일을 복사한다 - -5. **rules/project/rules.md 생성** +4. **rules/project/rules.md 생성** - 프로젝트를 분석하여 응답 언어, 프로젝트 개요, 기술 스택 등을 채운다 - common/rules.md와 내용이 중복되지 않도록 한다 -6. **도메인 분석 및 domain rule 생성** +5. **도메인 분석 및 domain rule 생성** - 신규 프로젝트: 핵심 domain placeholder 2~4개만 제안한다. domain rules를 과도하게 채우지 않는다 - 운영중 프로젝트: Core/Supporting/Generic 도메인을 식별하고 실제 경로를 반영한 초안을 생성한다 -7. **초기 skill 제안** +6. **초기 skill 제안** - 신규 프로젝트: 최소 2개만 제안한다 - 운영중 프로젝트: 반복 작업 기반으로 필요한 skill을 제안한다 -8. **결과 보고** +7. **결과 보고** - 상태 판별 결과, 생성된 파일 목록, 도메인 제안, skill 제안, 주의사항을 출력한다 ## 출력 형식 @@ -204,8 +226,8 @@ common/rules.md와 내용이 중복되지 않도록 한다. - 근거: 짧게 요약 ### 스캐폴드 계획 -- 생성할 파일 -- 바로 채울 파일 +- 스크립트로 생성된 공통 파일 +- 에이전트가 분석해 생성한 프로젝트 전용 파일 - placeholder로 둘 파일 ### 도메인 제안 diff --git a/agent-ops/skills/common/plan/SKILL.md b/agent-ops/skills/common/plan/SKILL.md index d998158..cdb9ee3 100644 --- a/agent-ops/skills/common/plan/SKILL.md +++ b/agent-ops/skills/common/plan/SKILL.md @@ -15,6 +15,8 @@ implementation -> code changes + filled CODE_REVIEW-{review_lane}-GNN.md code-review skill -> verdict + archive, complete.log, and PASS task-directory archive move or new follow-up plan/review files ``` +If this skill is invoked, the plan-code-review workflow is mandatory. Do not downgrade the request into an informal plan, and do not stop before writing both the active PLAN file and its paired CODE_REVIEW stub. + ## Workflow Contract This skill intentionally uses routed active files under `agent-task/{task_name}/` as the state protocol. Do not change this filename contract unless the paired code-review skill is updated together. diff --git a/agent-ops/skills/common/router.md b/agent-ops/skills/common/router.md index 537f60f..578c1b7 100644 --- a/agent-ops/skills/common/router.md +++ b/agent-ops/skills/common/router.md @@ -12,6 +12,6 @@ | 계획 세워줘, 구현 계획, PLAN.md, plan | `agent-ops/skills/common/plan/SKILL.md` | | 코드 리뷰해줘, 리뷰 진행해, 리뷰해줘, code review, CODE_REVIEW.md, 리뷰 루프 | `agent-ops/skills/common/code-review/SKILL.md` | | 커밋해줘, 푸시해줘, commit, push, 반영해줘 | `agent-ops/skills/common/commit-push/SKILL.md` | -| agent-ops 싱크해, agent-ops 동기화해, agentic-framework에 올려줘, agent-ops를 [프로젝트]로 싱크해 | `agent-ops/skills/common/sync-push/SKILL.md` | -| agent-ops pull해, agent-ops 가져와, agentic-framework에서 가져와, agent-ops 내려받아 | `agent-ops/skills/common/sync-pull/SKILL.md` | +| agent-ops 싱크해, agent-ops 동기화해, source repo에 올려줘, agentic-framework에 올려줘, agent-ops를 [프로젝트]로 싱크해 | `agent-ops/skills/common/sync-push/SKILL.md` | +| agent-ops pull해, agent-ops 가져와, source repo에서 가져와, agentic-framework에서 가져와, agent-ops 내려받아 | `agent-ops/skills/common/sync-pull/SKILL.md` | | 도메인 업데이트, domain rule 갱신, 도메인 검토, domain 스캔 | `agent-ops/skills/common/update-domain-rule/SKILL.md` | diff --git a/agent-ops/skills/common/sync-pull/SKILL.md b/agent-ops/skills/common/sync-pull/SKILL.md index adc2c42..cc2c130 100644 --- a/agent-ops/skills/common/sync-pull/SKILL.md +++ b/agent-ops/skills/common/sync-pull/SKILL.md @@ -1,25 +1,26 @@ --- name: sync-pull -description: agentic-framework에서 현재 프로젝트로 agent-ops를 내려받는다. "agent-ops pull해", "agentic-framework에서 가져와" 요청 시 사용한다. +description: source repo에서 현재 프로젝트로 agent-ops를 내려받는다. "agent-ops pull해", "source repo에서 가져와", "agentic-framework에서 가져와" 요청 시 사용한다. --- # sync-pull ## 목적 -`agent-ops/bin/sync.sh --pull`을 호출해 agentic-framework → 현재 프로젝트 방향으로 agent-ops를 내려받는다. +`agent-ops/bin/sync.sh --pull`을 호출해 `.agent-ops-source`가 있는 source repo → 현재 프로젝트 방향으로 agent-ops를 내려받는다. ## 언제 호출할지 - "agent-ops pull해", "agent-ops 가져와" 요청 시 -- "agentic-framework에서 가져와" 요청 시 +- "source repo에서 가져와", "agentic-framework에서 가져와" 요청 시 - "agent-ops 내려받아" 요청 시 ## 실행 절차 -1. 현재 프로젝트의 **상위 폴더(`../`)** 에 `agentic-framework` 폴더가 있는지 확인한다 (현재 폴더 내부가 아님) -2. **있으면**: `agent-ops/bin/sync.sh --pull agentic-framework` 실행 -3. **없으면**: 사용자에게 agentic-framework 경로 입력을 안내하고, 입력받은 경로로 실행 +1. 현재 프로젝트의 **상위 폴더(`../`)** 에 `.agent-ops-source`가 있는 source repo가 있는지 확인한다 +2. 기본 이름은 `agentic-framework`이고, 다른 이름을 쓰면 `AGENT_OPS_SOURCE_REPO=` 또는 명시 target을 사용한다 +3. **있으면**: `agent-ops/bin/sync.sh --pull` 또는 `agent-ops/bin/sync.sh --pull ` 실행 +4. **없으면**: 사용자에게 source repo 경로 입력을 안내하고, 입력받은 경로로 실행 ```bash agent-ops/bin/sync.sh --pull @@ -28,8 +29,8 @@ agent-ops/bin/sync.sh --pull ## 실행 결과 검증 - [ ] sync.sh 가 오류 없이 완료됐는가 -- [ ] 현재 프로젝트 버전이 framework 버전과 일치하는가 -- [ ] `agent-ops/bin/entry-files.sh`의 모든 진입 파일이 갱신됐고, 내용이 framework의 `agent-ops/rules/common/rules.md`와 일치하는가 +- [ ] 현재 프로젝트 버전이 source repo 버전과 일치하는가 +- [ ] `agent-ops/bin/entry-files.sh`의 모든 진입 파일이 갱신됐고, 내용이 source repo의 `agent-ops/rules/common/rules.md`와 일치하는가 ## 금지 사항 diff --git a/agent-ops/skills/common/sync-push/SKILL.md b/agent-ops/skills/common/sync-push/SKILL.md index 390437b..667d214 100644 --- a/agent-ops/skills/common/sync-push/SKILL.md +++ b/agent-ops/skills/common/sync-push/SKILL.md @@ -1,6 +1,6 @@ --- name: sync-push -description: 현재 프로젝트의 agent-ops를 agentic-framework로 올리거나, agentic-framework의 공통 agent-ops를 대상 프로젝트 또는 상위 폴더의 agent-ops 적용 프로젝트 전체로 push하고 푸시한다. "agent-ops 싱크해", "agent-ops 동기화해", "agentic-framework에 올려줘" 요청 시 사용한다. +description: 현재 프로젝트의 agent-ops를 source repo로 올리거나, source repo의 공통 agent-ops를 대상 프로젝트 또는 상위 폴더의 agent-ops 적용 프로젝트 전체로 push하고 푸시한다. "agent-ops 싱크해", "agent-ops 동기화해", "source repo에 올려줘" 요청 시 사용한다. --- # sync-push @@ -9,31 +9,33 @@ description: 현재 프로젝트의 agent-ops를 agentic-framework로 올리거 `agent-ops/bin/sync.sh`를 호출해 agent-ops 공통 파일을 push 방향으로 동기화한다. -- 일반 프로젝트에서는 현재 프로젝트 → agentic-framework 방향으로 올린다. -- agentic-framework 원본 프로젝트에서는 agentic-framework → 대상 프로젝트 방향으로 보내고, 대상 repo를 commit/push 한다. -- agentic-framework 원본 프로젝트에서 대상이 명시되지 않으면 현재 프로젝트의 상위 폴더에 있는 agent-ops 적용 프로젝트 전체로 보낸다. +- 일반 프로젝트에서는 현재 프로젝트 → `.agent-ops-source`가 있는 source repo 방향으로 올린다. +- source repo에서는 source repo → 대상 프로젝트 방향으로 보내고, 대상 repo를 commit/push 한다. +- source repo에서 대상이 명시되지 않으면 현재 프로젝트의 상위 폴더에 있는 agent-ops 적용 프로젝트 전체로 보낸다. +- 기본 source repo 이름은 `agentic-framework`이며, 필요하면 `AGENT_OPS_SOURCE_REPO` 환경 변수로 바꿀 수 있다. ## 언제 호출할지 - "agent-ops 싱크해", "agent-ops 동기화해" 요청 시 -- "agentic-framework에 올려줘" 요청 시 +- "source repo에 올려줘", "agentic-framework에 올려줘" 요청 시 - "agent-ops를 [프로젝트]로 싱크해" 요청 시 ## 실행 절차 ### 현 프로젝트가 일반 프로젝트인 경우 (`.agent-ops-source` 없음) -1. 현재 프로젝트의 **상위 폴더(`../`)** 에 `agentic-framework` 폴더가 있는지 확인한다 (현재 폴더 내부가 아님) -2. **있으면**: `agent-ops/bin/sync.sh` 실행 또는 `agent-ops/bin/sync.sh agentic-framework` 실행 -3. **없으면**: 사용자에게 agentic-framework 경로 입력을 안내하고, 입력받은 경로로 실행 +1. 현재 프로젝트의 **상위 폴더(`../`)** 에 `.agent-ops-source`가 있는 source repo가 있는지 확인한다 +2. 기본 이름은 `agentic-framework`이고, 다른 이름을 쓰면 `AGENT_OPS_SOURCE_REPO=` 또는 명시 target을 사용한다 +3. **있으면**: `agent-ops/bin/sync.sh` 실행 또는 `agent-ops/bin/sync.sh ` 실행 +4. **없으면**: 사용자에게 source repo 경로 입력을 안내하고, 입력받은 경로로 실행 -### 현 프로젝트가 agentic-framework인 경우 (`.agent-ops-source` 있음) +### 현 프로젝트가 source repo인 경우 (`.agent-ops-source` 있음) 1. 사용자 요청에서 target 프로젝트명 또는 경로를 추출한다 2. **명시된 경우**: `agent-ops/bin/sync.sh ` 실행 3. **명시되지 않은 경우**: `agent-ops/bin/sync.sh` 실행 4. target이 없으면 `sync.sh`가 현재 프로젝트 기준 상위 폴더(`../`)의 하위 디렉터리 중 `agent-ops/` 폴더가 있는 프로젝트를 모두 대상으로 삼는다 -5. `sync.sh`는 현재 agentic-framework의 `agent-ops/rules/common/rules.md` 내용을 대상 프로젝트 루트의 진입 파일에 덮어쓴다 +5. `sync.sh`는 현재 source repo의 `agent-ops/rules/common/rules.md` 내용을 대상 프로젝트 루트의 진입 파일에 덮어쓴다 6. 적용 후 각 대상 repo에서 agent-ops 공통 관리 경로(`rules/common/rules.md` 포함)와 진입 파일만 stage 하여 commit/push 한다 덮어쓰기 대상은 `init-agent-ops` 초기 세팅과 동일하며, 실제 목록은 `agent-ops/bin/entry-files.sh`의 `AGENT_OPS_ENTRY_FILES`를 단일 기준으로 사용한다. @@ -58,8 +60,8 @@ agent-ops/bin/sync.sh [target] - [ ] sync.sh 가 오류 없이 완료됐는가 - [ ] 버전 충돌 경고가 없었는가 — 있었다면 사용자에게 수동 머지 필요함을 알린다 -- [ ] 대상 repo의 `agent-ops/rules/common/rules.md`가 현재 agentic-framework의 `agent-ops/rules/common/rules.md`와 일치하는가 -- [ ] agentic-framework에서 대상 프로젝트로 push한 경우, `agent-ops/bin/entry-files.sh`의 모든 진입 파일 내용이 현재 agentic-framework의 `agent-ops/rules/common/rules.md`와 일치하는가 +- [ ] 대상 repo의 `agent-ops/rules/common/rules.md`가 현재 source repo의 `agent-ops/rules/common/rules.md`와 일치하는가 +- [ ] source repo에서 대상 프로젝트로 push한 경우, `agent-ops/bin/entry-files.sh`의 모든 진입 파일 내용이 현재 source repo의 `agent-ops/rules/common/rules.md`와 일치하는가 - [ ] 대상 repo에 commit/push 된 path가 agent-ops 공통 관리 경로와 진입 파일로 제한되었는가 ## 금지 사항