@walwal-harness/cli 4.0.0-beta.7 → 4.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/harness-monitor.sh +32 -32
- package/skills/team-action/SKILL.md +49 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walwal-harness/cli",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.9",
|
|
4
4
|
"description": "Production harness for AI agent engineering — Planner, Generator(BE/FE), Evaluator(Func/Visual), optional Brainstormer (requirements refinement). Supports React and Flutter FE stacks.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"walwal-harness": "bin/init.js"
|
|
@@ -285,44 +285,44 @@ cleanup() {
|
|
|
285
285
|
}
|
|
286
286
|
trap cleanup EXIT INT TERM
|
|
287
287
|
|
|
288
|
-
# v4
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
288
|
+
# 매 루프마다 v4/v3 동적 감지 — 시작 후에도 모드 전환 가능
|
|
289
|
+
tput civis 2>/dev/null
|
|
290
|
+
clear
|
|
291
|
+
|
|
292
|
+
CURRENT_MODE=""
|
|
293
|
+
|
|
294
|
+
while true; do
|
|
295
|
+
# 동적 모드 감지
|
|
296
|
+
if [ -f "$QUEUE" ]; then
|
|
297
|
+
NEW_MODE="v4"
|
|
298
|
+
else
|
|
299
|
+
NEW_MODE="v3"
|
|
300
|
+
fi
|
|
293
301
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
302
|
+
# 모드 전환 시 화면 초기화
|
|
303
|
+
if [ "$NEW_MODE" != "$CURRENT_MODE" ]; then
|
|
304
|
+
clear
|
|
305
|
+
CURRENT_MODE="$NEW_MODE"
|
|
306
|
+
if [ "$CURRENT_MODE" = "v3" ]; then
|
|
307
|
+
# v3 초기화
|
|
308
|
+
if [ -f "$PROGRESS" ]; then
|
|
309
|
+
LAST_AGENT=$(jq -r '.current_agent // "none"' "$PROGRESS" 2>/dev/null)
|
|
310
|
+
LAST_STATUS=$(jq -r '.agent_status // "pending"' "$PROGRESS" 2>/dev/null)
|
|
311
|
+
LAST_SPRINT=$(jq -r '.sprint.number // 0' "$PROGRESS" 2>/dev/null)
|
|
312
|
+
fi
|
|
313
|
+
stream_audit
|
|
314
|
+
fi
|
|
315
|
+
fi
|
|
298
316
|
|
|
299
|
-
|
|
317
|
+
if [ "$CURRENT_MODE" = "v4" ]; then
|
|
300
318
|
buf=$(render_v4 2>&1)
|
|
301
319
|
tput cup 0 0 2>/dev/null
|
|
302
320
|
echo "$buf"
|
|
303
321
|
tput ed 2>/dev/null
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
else
|
|
307
|
-
# ── v3: 단일 스트림, audit tail ──
|
|
308
|
-
print_v3_header
|
|
309
|
-
|
|
310
|
-
if [ -f "$PROGRESS" ]; then
|
|
311
|
-
LAST_AGENT=$(jq -r '.current_agent // "none"' "$PROGRESS" 2>/dev/null)
|
|
312
|
-
LAST_STATUS=$(jq -r '.agent_status // "pending"' "$PROGRESS" 2>/dev/null)
|
|
313
|
-
LAST_SPRINT=$(jq -r '.sprint.number // 0' "$PROGRESS" 2>/dev/null)
|
|
314
|
-
|
|
315
|
-
echo -e " ${BOLD}History${RESET}"
|
|
316
|
-
jq -r '.history // [] | .[] | " \(.timestamp) \(.agent) — \(.action): \(.detail)"' "$PROGRESS" 2>/dev/null
|
|
317
|
-
echo ""
|
|
318
|
-
echo -e " ${DIM}── Live events below ──${RESET}"
|
|
319
|
-
echo ""
|
|
322
|
+
else
|
|
323
|
+
check_transitions
|
|
320
324
|
fi
|
|
321
325
|
|
|
322
|
-
|
|
326
|
+
sleep 3
|
|
327
|
+
done
|
|
323
328
|
|
|
324
|
-
while true; do
|
|
325
|
-
check_transitions
|
|
326
|
-
sleep 2
|
|
327
|
-
done
|
|
328
|
-
fi
|
|
@@ -73,9 +73,34 @@ Agent({
|
|
|
73
73
|
## 할당된 Feature
|
|
74
74
|
- Feature ID: {FEATURE_ID}
|
|
75
75
|
- 프로젝트 루트: 현재 디렉토리 (worktree 복사본)
|
|
76
|
+
- 하네스 루트: 메인 프로젝트 루트 (worktree가 아닌 원본)
|
|
77
|
+
|
|
78
|
+
## 실시간 로깅 (필수)
|
|
79
|
+
|
|
80
|
+
모든 Phase 전환 시 반드시 아래 두 명령을 실행하세요. Monitor 대시보드에 실시간 반영됩니다.
|
|
81
|
+
|
|
82
|
+
**progress.log 기록** (하네스 루트의 progress.log에 append):
|
|
83
|
+
```bash
|
|
84
|
+
echo "$(date +'%Y-%m-%d %H:%M') | team-{N} | {ACTION} | {DETAIL}" >> {HARNESS_ROOT}/.harness/progress.log
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**queue phase 업데이트** (feature-queue.json의 팀 상태 갱신):
|
|
88
|
+
```bash
|
|
89
|
+
bash {HARNESS_ROOT}/scripts/harness-queue-manager.sh update_phase {FEATURE_ID} {PHASE} .
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
> {HARNESS_ROOT}는 worktree의 원본 프로젝트 경로입니다. `git worktree list` 첫 줄에서 확인 가능합니다.
|
|
93
|
+
> 워커 시작 시 먼저 실행: `HARNESS_ROOT=$(git worktree list | head -1 | awk '{print $1}')`
|
|
76
94
|
|
|
77
95
|
## Phase 1: Generator (코드 생성)
|
|
78
96
|
|
|
97
|
+
**시작 시 로깅:**
|
|
98
|
+
```bash
|
|
99
|
+
HARNESS_ROOT=$(git worktree list | head -1 | awk '{print $1}')
|
|
100
|
+
echo "$(date +'%Y-%m-%d %H:%M') | team-{N} | gen | {FEATURE_ID} start" >> "$HARNESS_ROOT/.harness/progress.log"
|
|
101
|
+
bash "$HARNESS_ROOT/scripts/harness-queue-manager.sh" update_phase {FEATURE_ID} gen "$HARNESS_ROOT"
|
|
102
|
+
```
|
|
103
|
+
|
|
79
104
|
1. Feature 정보 확인:
|
|
80
105
|
- `jq '.features[] | select(.id == "{FEATURE_ID}")' .harness/actions/feature-list.json`
|
|
81
106
|
- `.harness/actions/api-contract.json`에서 관련 엔드포인트 확인
|
|
@@ -90,8 +115,19 @@ Agent({
|
|
|
90
115
|
- eslint (린트) 실행
|
|
91
116
|
- 컴파일 에러가 있으면 직접 수정 (Eval에 넘기지 않음)
|
|
92
117
|
|
|
118
|
+
**Gen 완료 로깅:**
|
|
119
|
+
```bash
|
|
120
|
+
echo "$(date +'%Y-%m-%d %H:%M') | team-{N} | gen | {FEATURE_ID} done — {변경파일수} files" >> "$HARNESS_ROOT/.harness/progress.log"
|
|
121
|
+
```
|
|
122
|
+
|
|
93
123
|
## Phase 2: Evaluator (독립 평가 — Agent 도구 사용)
|
|
94
124
|
|
|
125
|
+
**Eval 시작 로깅:**
|
|
126
|
+
```bash
|
|
127
|
+
echo "$(date +'%Y-%m-%d %H:%M') | team-{N} | eval | {FEATURE_ID} eval start" >> "$HARNESS_ROOT/.harness/progress.log"
|
|
128
|
+
bash "$HARNESS_ROOT/scripts/harness-queue-manager.sh" update_phase {FEATURE_ID} eval "$HARNESS_ROOT"
|
|
129
|
+
```
|
|
130
|
+
|
|
95
131
|
코드 생성이 완료되면 **별도 Agent를 생성하여 평가**합니다.
|
|
96
132
|
이 Evaluator Agent는 당신(Generator)의 추론 과정을 모릅니다.
|
|
97
133
|
오직 코드와 AC만 보고 판단합니다.
|
|
@@ -137,15 +173,24 @@ FEEDBACK: (FAIL인 경우만) 구체적 수정 지시
|
|
|
137
173
|
Evaluator Agent 결과를 확인합니다:
|
|
138
174
|
|
|
139
175
|
### PASS인 경우 (VERDICT: PASS, SCORE ≥ 2.80):
|
|
140
|
-
|
|
141
|
-
|
|
176
|
+
```bash
|
|
177
|
+
echo "$(date +'%Y-%m-%d %H:%M') | team-{N} | pass | {FEATURE_ID} PASS score={SCORE}" >> "$HARNESS_ROOT/.harness/progress.log"
|
|
178
|
+
bash "$HARNESS_ROOT/scripts/harness-queue-manager.sh" pass {FEATURE_ID} "$HARNESS_ROOT"
|
|
179
|
+
```
|
|
180
|
+
변경 파일 목록과 AC 충족 요약을 Lead에게 반환.
|
|
142
181
|
|
|
143
182
|
### FAIL인 경우:
|
|
183
|
+
```bash
|
|
184
|
+
echo "$(date +'%Y-%m-%d %H:%M') | team-{N} | fail | {FEATURE_ID} FAIL #{ATTEMPT} — {사유요약}" >> "$HARNESS_ROOT/.harness/progress.log"
|
|
185
|
+
```
|
|
144
186
|
1. Evaluator의 FEEDBACK을 읽고 코드를 수정 (Phase 1로 돌아감)
|
|
145
187
|
2. 수정 후 다시 Phase 2 (새 Evaluator Agent 생성 — 이전 Eval 컨텍스트 없음)
|
|
146
188
|
3. 최대 3회 시도. 3회 모두 FAIL이면:
|
|
147
|
-
|
|
148
|
-
-
|
|
189
|
+
```bash
|
|
190
|
+
echo "$(date +'%Y-%m-%d %H:%M') | team-{N} | fail | {FEATURE_ID} FINAL FAIL after 3 attempts" >> "$HARNESS_ROOT/.harness/progress.log"
|
|
191
|
+
bash "$HARNESS_ROOT/scripts/harness-queue-manager.sh" fail {FEATURE_ID} "$HARNESS_ROOT"
|
|
192
|
+
```
|
|
193
|
+
실패 사유와 마지막 Eval 결과를 Lead에게 반환.
|
|
149
194
|
```
|
|
150
195
|
|
|
151
196
|
## Step 4: 결과 수집 및 다음 라운드
|