From 14976fc9f1047ced995f6f40a380d62589c1bce5 Mon Sep 17 00:00:00 2001 From: leedongmyung Date: Fri, 24 Apr 2026 07:18:05 +0900 Subject: [PATCH] feat: add init-agent-ops.sh and update skill documentation --- agent-ops/bin/init-agent-ops.sh | 47 +++++++++++++++++++ .../skills/common/init-agent-ops/SKILL.md | 8 ++++ 2 files changed, 55 insertions(+) create mode 100755 agent-ops/bin/init-agent-ops.sh diff --git a/agent-ops/bin/init-agent-ops.sh b/agent-ops/bin/init-agent-ops.sh new file mode 100755 index 0000000..3e473b5 --- /dev/null +++ b/agent-ops/bin/init-agent-ops.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# agent-ops/bin/init-agent-ops.sh +# 프로젝트에 agent-ops 스캐폴드를 초기화하는 스크립트 + +set -e + +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi + +TARGET_DIR=$(realpath "$1") +SOURCE_DIR=$(realpath "$(dirname "$0")/..") + +echo "Initializing agent-ops in: $TARGET_DIR" +echo "Source agent-ops: $SOURCE_DIR" + +# 1. 대상 폴더 생성 +mkdir -p "$TARGET_DIR/agent-ops/rules/project/domain" +mkdir -p "$TARGET_DIR/agent-ops/rules/private" +mkdir -p "$TARGET_DIR/agent-ops/skills/project" + +# 2. 공통 요소 복사 (프로젝트 전용 설정은 제외) +cp "$SOURCE_DIR/.version" "$TARGET_DIR/agent-ops/" +cp -r "$SOURCE_DIR/rules/common" "$TARGET_DIR/agent-ops/rules/" +cp -r "$SOURCE_DIR/skills/common" "$TARGET_DIR/agent-ops/skills/" + +# 3. 에이전트 진입 파일 생성 (common/rules.md 복사) +COMMON_RULES="$SOURCE_DIR/rules/common/rules.md" +cp "$COMMON_RULES" "$TARGET_DIR/GEMINI.md" +cp "$COMMON_RULES" "$TARGET_DIR/CLAUDE.md" +cp "$COMMON_RULES" "$TARGET_DIR/AGENTS.md" +cp "$COMMON_RULES" "$TARGET_DIR/.cursorrules" +cp "$COMMON_RULES" "$TARGET_DIR/.clinerules" + +# 4. .gitignore 설정 +TOUCH_GITIGNORE="$TARGET_DIR/.gitignore" +touch "$TOUCH_GITIGNORE" +if ! grep -q "agent-ops/rules/private/" "$TOUCH_GITIGNORE"; then + echo "" >> "$TOUCH_GITIGNORE" + echo "# Agent-Ops Private Rules" >> "$TOUCH_GITIGNORE" + echo "agent-ops/rules/private/" >> "$TOUCH_GITIGNORE" +fi + +echo "Successfully initialized agent-ops in $TARGET_DIR" +echo "Note: agent-ops/rules/project and agent-ops/skills/project are initialized as empty." diff --git a/agent-ops/skills/common/init-agent-ops/SKILL.md b/agent-ops/skills/common/init-agent-ops/SKILL.md index c105459..507c29c 100644 --- a/agent-ops/skills/common/init-agent-ops/SKILL.md +++ b/agent-ops/skills/common/init-agent-ops/SKILL.md @@ -149,6 +149,14 @@ common/rules.md와 내용이 중복되지 않도록 한다. 도메인은 실제 폴더, 모듈, 패키지, 책임 경계와 연결되어야 한다. +## 실행 (Execution) + +지정한 대상 디렉토리에 agent-ops 스캐폴드를 생성한다. + +```bash +./agent-ops/bin/init-agent-ops.sh +``` + ## 실행 절차 1. **상태 판별**