Refactor skills directory structure to agent-ops/skills

This commit is contained in:
toki 2026-04-12 17:13:12 +09:00
parent a050007a55
commit 6f6927292d
6 changed files with 77 additions and 22 deletions

View file

@ -17,7 +17,7 @@ plan skill -> implementation -> code-review skill
## Workflow Contract
Active work must live at `tasks/{task_name}/PLAN.md` and `tasks/{task_name}/CODE_REVIEW.md`. These paths are the state protocol shared with the plan skill. Do not adapt them per repository unless the whole loop contract is intentionally changed in both skills.
Active work must live at `agent-task/{task_name}/PLAN.md` and `agent-task/{task_name}/CODE_REVIEW.md`. These paths are the state protocol shared with the plan skill. Do not adapt them per repository unless the whole loop contract is intentionally changed in both skills.
Directory states:
@ -31,7 +31,7 @@ The implementing agent never archives or deletes active files; archiving is this
## Step 1 - Find Active Task
Glob `tasks/*/CODE_REVIEW.md`:
Glob `agent-task/*/CODE_REVIEW.md`:
| Result | Action |
|--------|--------|
@ -41,7 +41,7 @@ Glob `tasks/*/CODE_REVIEW.md`:
## Step 2 - Load Context
Count `tasks/{task_name}/code_review_*.log`:
Count `agent-task/{task_name}/code_review_*.log`:
- `0`: first review. Read `CODE_REVIEW.md`, `PLAN.md`, every planned source file, related tests, and files importing/imported by changed files up to 2 levels deep.
- `>=1`: follow-up review. Start with `git diff`, `git diff --cached`, and `git log --oneline -5`, then expand to related callers, implementers, tests, and any planned files missing from the diff.
@ -94,7 +94,7 @@ After archiving, neither active `.md` file remains unless Step 6 writes a follow
## Step 6 - Post-Review Actions
For `PASS`, write `tasks/{task_name}/complete.log` before reporting:
For `PASS`, write `agent-task/{task_name}/complete.log` before reporting:
Required fields in `complete.log`:
- `완료 일시`: date completed.

View file

@ -17,7 +17,7 @@ code-review skill -> verdict + archive, or new follow-up PLAN.md
## Workflow Contract
This skill intentionally uses `tasks/{task_name}/PLAN.md` and `tasks/{task_name}/CODE_REVIEW.md` as the state protocol between planning, implementation, and review. Do not change these paths or filenames unless the paired plan and code-review skills are updated together. This convention is not project-specific; it is the workflow contract for this skill loop.
This skill intentionally uses `agent-task/{task_name}/PLAN.md` and `agent-task/{task_name}/CODE_REVIEW.md` as the state protocol between planning, implementation, and review. Do not change these paths or filenames unless the paired plan and code-review skills are updated together. This convention is not project-specific; it is the workflow contract for this skill loop.
Directory states:
@ -26,13 +26,14 @@ Directory states:
| `PLAN.md` only | Invalid; plan skill always writes both files |
| `PLAN.md` + `CODE_REVIEW.md` stub | Implementation is pending/in progress |
| `PLAN.md` + filled `CODE_REVIEW.md` | Ready for code-review skill |
| Only `*.log` files | Task complete |
| `complete.log` + `*.log` files | Task complete (PASS) |
| Only `*.log` files (no `complete.log`) | Task terminated mid-loop or abandoned |
## Step 1 - Determine Task
If the user names the task explicitly, use that task name.
Otherwise, glob `tasks/*/PLAN.md`:
Otherwise, glob `agent-task/*/PLAN.md`:
| Result | Action |
|--------|--------|
@ -60,8 +61,8 @@ Complete these before creating files:
Before writing new active files for the chosen task:
- Count existing `tasks/{task_name}/plan_*.log`; call it `N`. If `PLAN.md` exists, rename it to `plan_N.log`.
- Count existing `tasks/{task_name}/code_review_*.log`; call it `M`. If `CODE_REVIEW.md` exists, rename it to `code_review_M.log`.
- Count existing `agent-task/{task_name}/plan_*.log`; call it `N`. If `PLAN.md` exists, rename it to `plan_N.log`.
- Count existing `agent-task/{task_name}/code_review_*.log`; call it `M`. If `CODE_REVIEW.md` exists, rename it to `code_review_M.log`.
The new plan number is the count of `plan_*.log` after archiving.
@ -70,7 +71,7 @@ The new plan number is the count of `plan_*.log` after archiving.
Header line must be exactly:
```markdown
<!-- task={task_name} plan=N tag=TAG -->
<!-- task={task_name} plan={N} tag={TAG} -->
```
Required sections:
@ -113,21 +114,75 @@ Test policy:
## Step 5 - Write CODE_REVIEW.md Stub
Header line must match PLAN.md:
Use the template below exactly. Fill `{…}` placeholders from the plan; everything else is fixed and must not be changed by the implementing agent.
```markdown
<!-- task={task_name} plan=N tag=TAG -->
<!-- task={task_name} plan={N} tag={TAG} -->
# Code Review Reference - {TAG}
## 개요
date={YYYY-MM-DD}
task={task_name}, plan={N}, tag={TAG}
## 이 파일을 읽는 리뷰 에이전트에게
각 항목의 구현을 실제 소스 파일과 대조하고, `검증 결과` 섹션의 출력이 코드와 일치하는지 확인하세요.
리뷰 완료 후 반드시 아래 순서로 아카이브하세요.
1. `CODE_REVIEW.md``code_review_N.log` (N = 기존 code_review_*.log 수)
2. `PLAN.md``plan_M.log` (M = 기존 plan_*.log 수)
3. PASS인 경우 `complete.log` 작성 후 종료. WARN/FAIL인 경우 새 `PLAN.md` + `CODE_REVIEW.md` 스텁 작성.
---
## 구현 항목별 완료 여부
| 항목 | 완료 여부 |
|------|---------|
| [{TAG}-1] {item description} | [ ] |
| [{TAG}-2] {item description} | [ ] |
## 계획 대비 변경 사항
_구현 에이전트가 계획과 다르게 구현한 부분을 이유와 함께 기록한다._
## 주요 설계 결정
_구현 에이전트가 주요 설계 결정 사항을 기록한다._
## 리뷰어를 위한 체크포인트
{pre-filled from plan — one bullet per review focus area}
## 검증 결과
_구현 에이전트가 각 중간 검증 및 최종 검증 명령 실행 후 출력을 여기에 붙여 넣는다._
### {TAG}-1 중간 검증
```
$ {verification command from plan}
(output)
```
Required sections:
### 최종 검증
```
$ {final verification command from plan}
(output)
```
```
- `# Code Review Reference - TAG`
- `개요`: `task={task_name}, plan=N, tag=TAG`
- `구현 항목별 완료 여부`: one row per plan item, unchecked.
- `계획 대비 변경 사항`
- `주요 설계 결정`
- `리뷰어를 위한 체크포인트`
- `검증 결과`
Sections and their ownership:
| 섹션 | 소유자 | 설명 |
|------|--------|------|
| 헤더 주석, 개요(date/task/plan/tag), 리뷰 에이전트 지시 | 스텁 생성 시 고정 | 구현 에이전트가 수정하지 않음 |
| 구현 항목별 완료 여부 (항목명) | 스텁 생성 시 고정 | `[ ]``[x]` 체크만 구현 에이전트가 수행 |
| 계획 대비 변경 사항, 주요 설계 결정 | 구현 에이전트가 채움 | placeholder 텍스트를 실제 내용으로 교체 |
| 리뷰어를 위한 체크포인트 | 스텁 생성 시 고정 | 계획에서 추출한 리뷰 포인트 |
| 검증 결과 (섹션 제목 + 명령) | 스텁 생성 시 고정 | 실행 출력만 구현 에이전트가 채움 |
| 코드리뷰 결과 | 리뷰 에이전트가 append | 스텁에 포함하지 않음 |
## Naming
@ -140,8 +195,8 @@ Required sections:
## Final Checklist
- `PLAN.md` and `CODE_REVIEW.md` both exist under `tasks/{task_name}/`.
- Both first lines match `<!-- task={task_name} plan=N tag=TAG -->`.
- `PLAN.md` and `CODE_REVIEW.md` both exist under `agent-task/{task_name}/`.
- Both first lines match `<!-- task={task_name} plan={N} tag={TAG} -->`.
- Previous active files, if any, were archived with correct numeric suffixes.
- Every plan item has problem, solution, checklist, test decision, and intermediate verification.
- `CODE_REVIEW.md` completion table lists every plan item.