diff --git a/agent-ops/.version b/agent-ops/.version index e9bc149..645377e 100644 --- a/agent-ops/.version +++ b/agent-ops/.version @@ -1 +1 @@ -1.1.14 +1.1.15 diff --git a/agent-ops/bin/init-agent-ops.sh b/agent-ops/bin/init-agent-ops.sh index 449c410..142a9f6 100755 --- a/agent-ops/bin/init-agent-ops.sh +++ b/agent-ops/bin/init-agent-ops.sh @@ -27,20 +27,38 @@ append_unique_line() { fi } +create_project_agent_ops_dirs() { + local agent_ops_dir="$1" + + mkdir -p "$agent_ops_dir/rules/project/domain" + mkdir -p "$agent_ops_dir/rules/private" + mkdir -p "$agent_ops_dir/skills/project" +} + +copy_common_agent_ops() { + local source_dir="$1" + local target_agent_ops_dir="$2" + + mkdir -p "$target_agent_ops_dir/rules" + mkdir -p "$target_agent_ops_dir/skills" + + cp "$source_dir/.version" "$target_agent_ops_dir/" + rm -rf "$target_agent_ops_dir/bin" + rm -rf "$target_agent_ops_dir/rules/common" + rm -rf "$target_agent_ops_dir/skills/common" + cp -r "$source_dir/bin" "$target_agent_ops_dir/" + cp -r "$source_dir/rules/common" "$target_agent_ops_dir/rules/" + cp -r "$source_dir/skills/common" "$target_agent_ops_dir/skills/" +} + 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" +# 1. 대상 폴더 생성 (프로젝트 전용 폴더는 내용 복사 없이 폴더만 생성) +create_project_agent_ops_dirs "$TARGET_DIR/agent-ops" # 2. 공통 요소 복사 (프로젝트 전용 설정은 제외) -cp "$SOURCE_DIR/.version" "$TARGET_DIR/agent-ops/" -rm -rf "$TARGET_DIR/agent-ops/bin" -cp -r "$SOURCE_DIR/bin" "$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/" +copy_common_agent_ops "$SOURCE_DIR" "$TARGET_DIR/agent-ops" # 3. 에이전트 진입 파일 생성 (common/rules.md 복사) COMMON_RULES="$SOURCE_DIR/rules/common/rules.md" diff --git a/agent-ops/bin/sync.sh b/agent-ops/bin/sync.sh index 632853d..c32cdb7 100755 --- a/agent-ops/bin/sync.sh +++ b/agent-ops/bin/sync.sh @@ -71,6 +71,24 @@ sync_common() { sync_folder "$src/bin" "$dst/bin" } +create_project_agent_ops_dirs() { + local agent_ops_dir="$1" + mkdir -p "$agent_ops_dir/rules/project/domain" + mkdir -p "$agent_ops_dir/rules/private" + mkdir -p "$agent_ops_dir/skills/project" +} + +copy_common_scaffold() { + local src="$1" dst="$2" + mkdir -p "$dst/rules" "$dst/skills" + cp "$src/.version" "$dst/" + rm -rf "$dst/bin" "$dst/rules/common" "$dst/skills/common" + cp -r "$src/bin" "$dst/" + cp -r "$src/rules/common" "$dst/rules/" + cp -r "$src/skills/common" "$dst/skills/" + create_project_agent_ops_dirs "$dst" +} + # ── 사용법 ──────────────────────────────────────────────────────────────────── usage() { echo "사용법: $0 [--pull] " @@ -134,8 +152,8 @@ echo "▶ $(basename "$PROJECT_ROOT") → $(basename "$TARGET")" # ── agentic-framework에서 다른 프로젝트로 ──────────────────────────────────── if [[ "$IS_FRAMEWORK" == "1" ]]; then if [[ ! -d "$DST_AO" ]]; then - echo " 최초 진행: agent-ops 전체 복사" - cp -r "$SRC_AO" "$TARGET/" + echo " 최초 진행: agent-ops 공통 scaffold 복사" + copy_common_scaffold "$SRC_AO" "$DST_AO" apply_agent_ops_entry_files "$SRC_AO/rules/common/rules.md" "$TARGET" echo -e "${YELLOW} init-agent-ops 스킬로 초기화를 진행하세요.${RESET}" else diff --git a/agent-ops/skills/common/plan/SKILL.md b/agent-ops/skills/common/plan/SKILL.md index 897de37..b254316 100644 --- a/agent-ops/skills/common/plan/SKILL.md +++ b/agent-ops/skills/common/plan/SKILL.md @@ -31,9 +31,12 @@ Task directory naming rules: - A single-plan task uses `agent-task/{task_name}/` with a short snake_case task name. - If one plan is not enough, split the work into multiple task directories. Each directory owns exactly one normal active plan file and one normal active review stub. - Multi-plan output is a set of independent `PLAN-{build_lane}-GNN.md` + `CODE_REVIEW-{review_lane}-GNN.md` pairs across multiple folders, not multiple plan files inside one folder. -- Multi-plan task directory names must start with an execution-order index: `01_{task_name}`, `02_{task_name}`, `03_{task_name}`, and so on. -- If a later task cannot start until a specific current task is complete, mark that dependency immediately after the current task's index with `+`, not `_`: `01+{dependent_task_name}` means this task depends on completion of the `01_...` task. -- When multiple dependent tasks share the same predecessor, order them after the dependency marker: `01+01_{task_name}`, `01+02_{task_name}`. +- Multi-plan task directory names must start with the current task's execution-order index: `01_{task_name}`, `02_{task_name}`, `03_{task_name}`, and so on. The leading number is always the current task index and must increase across sibling task directories. +- Use `_` after the index for a task that can start independently at that point: `01_{task_name}`, `03_{task_name}`. +- Use `+` instead of `_` after the index for a task that depends on an earlier task: `02+{task_name}`. Do not put predecessor numbers in the directory name. +- Record the exact predecessor task directory or directories in the plan's `의존 관계 및 구현 순서` section. +- Example: split a common core plus two app integrations as `01_core`, `02+edge_integration`, `03+node_integration`. In both `02+...` and `03+...`, write that they depend on `agent-task/01_core`. The `+` marker does not mean `03+...` depends on `02+...`; if `03+...` also depends on `02+...`, say so explicitly in `의존 관계 및 구현 순서`. +- Example: split three sequential tasks as `01_schema`, `02+migration`, `03+api`. In `02+migration`, list `agent-task/01_schema` as predecessor. In `03+api`, list `agent-task/02+migration` as predecessor. - Directory names are runtime scheduling metadata. Preserve them verbatim; do not normalize, reinterpret, or choose execution order by agent judgment. - Every split plan must include `의존 관계 및 구현 순서` and list predecessor task directories that must reach `complete.log` before implementation begins. @@ -151,7 +154,7 @@ Each plan item must include: Include `의존 관계 및 구현 순서` only when order matters. -For split multi-plan work, `의존 관계 및 구현 순서` is mandatory in every generated plan. If a plan has a `NN+...` directory name, state which `NN_...` predecessor must produce `complete.log` before implementation starts. +For split multi-plan work, `의존 관계 및 구현 순서` is mandatory in every generated plan. If a plan has a `NN+...` directory name, state which predecessor task directory or directories must produce `complete.log` before implementation starts. Quality rules: @@ -308,7 +311,7 @@ Sections and their ownership: ## Final Checklist - `PLAN-{build_lane}-GNN.md` and `CODE_REVIEW-{review_lane}-GNN.md` both exist under `agent-task/{task_name}/`. -- Split work, if any, uses one task directory per plan/review pair with `01_...`, `02_...`, or dependency-marked `NN+...` names. +- Split work, if any, uses one task directory per plan/review pair with names like `01_core`, `02+edge_integration`, `03+node_integration`; predecessor details live in `의존 관계 및 구현 순서`, not in the directory name. - Both first lines match ``. - Previous active files, if any, were archived with correct numeric suffixes. - Every plan item has problem, solution, checklist, test decision, and intermediate verification.