@walwal-harness/cli 6.0.4 → 6.1.0

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.
@@ -25,7 +25,8 @@ sprint_num=$(jq -r '.sprint.number // 0' "$PROGRESS" 2>/dev/null)
25
25
  current_agent=$(jq -r '.current_agent // "none"' "$PROGRESS" 2>/dev/null)
26
26
  next_agent=$(jq -r '.next_agent // "none"' "$PROGRESS" 2>/dev/null)
27
27
  agent_status=$(jq -r '.agent_status // "pending"' "$PROGRESS" 2>/dev/null)
28
- mode=$(jq -r '.mode // "solo"' "$PROGRESS" 2>/dev/null)
28
+ mode=$(jq -r '.mode // "team"' "$PROGRESS" 2>/dev/null)
29
+ conductor_state=$(jq -r '.conductor.state // "idle"' "$PROGRESS" 2>/dev/null)
29
30
 
30
31
  # ─────────────────────────────────────────
31
32
  # Auto-heal mode drift — Team 상태 유실 복구
@@ -65,8 +66,8 @@ if [ "$mode" = "team" ]; then
65
66
 
66
67
  echo "# Harness Team Mode active"
67
68
  echo "# Queue: ${passed}/${total} passed, ${in_prog} in progress, ${failed} failed"
68
- echo "# Teams run autonomously (Gen-Eval loop, max 5 retries)."
69
- echo "# Stop: /harness-stop | Switch to solo: /harness-solo"
69
+ echo "# Worker pool runs autonomously (Gen-Eval loop, max 5 retries). Control-plane Cxx agents are outside this limit."
70
+ echo "# Stop: /harness-stop | Emergency fallback: /harness-solo"
70
71
  exit 0
71
72
  fi
72
73
 
@@ -74,7 +75,7 @@ fi
74
75
  # Paused Mode — 중단 상태 안내
75
76
  # ─────────────────────────────────────────
76
77
  if [ "$mode" = "paused" ]; then
77
- echo "# Harness paused — resume with /harness-team or /harness-solo"
78
+ echo "# Harness paused — resume with /harness-team"
78
79
  exit 0
79
80
  fi
80
81
 
@@ -83,7 +84,7 @@ fi
83
84
  # ─────────────────────────────────────────
84
85
  if [ "$sprint_status" = "init" ]; then
85
86
  echo "# Harness ready — say \"하네스 엔지니어링 시작\" or /harness-dispatcher"
86
- echo "# 기본은 Solo 모드. 병렬 3팀 실행을 원하면 Planner 완료 후 /harness-team."
87
+ echo "# 기본 경로는 회사 루프입니다: dispatch -> CEO meeting -> COO/CTO 분배 -> gen/eval -> CQO -> service-ops -> batch meeting."
87
88
  exit 0
88
89
  fi
89
90
 
@@ -107,6 +108,16 @@ if [ "$agent_status" = "completed" ] || [ "$agent_status" = "failed" ]; then
107
108
  agent_status=$(jq -r '.agent_status // "pending"' "$PROGRESS" 2>/dev/null)
108
109
  fi
109
110
 
111
+ # ─────────────────────────────────────────
112
+ # Conductor running/queued → refresh routing once on session start
113
+ # ─────────────────────────────────────────
114
+ if [ "$conductor_state" = "running" ] || [ "$next_agent" = "conductor" ]; then
115
+ if [ -x "$SCRIPT_DIR/conductor-tick.sh" ]; then
116
+ bash "$SCRIPT_DIR/conductor-tick.sh" "$PROJECT_ROOT" >/dev/null 2>&1 || true
117
+ next_agent=$(jq -r '.next_agent // "none"' "$PROGRESS" 2>/dev/null)
118
+ fi
119
+ fi
120
+
110
121
  # ─────────────────────────────────────────
111
122
  # 상태별 안내 출력
112
123
  # ─────────────────────────────────────────
@@ -0,0 +1,48 @@
1
+ #!/bin/bash
2
+ # harness-task-session.sh — create per-agent task session document
3
+ set -euo pipefail
4
+
5
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
6
+ source "$SCRIPT_DIR/lib/harness-render-progress.sh"
7
+
8
+ PROJECT_ROOT="$(resolve_harness_root "${1:-.}")" || exit 1
9
+ AGENT="${2:-}"
10
+ SOURCE="${3:-}"
11
+
12
+ [ -n "$AGENT" ] || exit 2
13
+ command -v jq >/dev/null 2>&1 || exit 1
14
+
15
+ PROGRESS="$PROJECT_ROOT/.harness/progress.json"
16
+ TASK_ROOT="$PROJECT_ROOT/.harness/actions/task-sessions/$AGENT"
17
+ mkdir -p "$TASK_ROOT"
18
+
19
+ dispatch_id=$(jq -r '.dispatch.id // "D-000"' "$PROGRESS")
20
+ sprint_num=$(jq -r '.sprint.number // 0' "$PROGRESS")
21
+ ts=$(date -u +%Y%m%dT%H%M%SZ)
22
+ session_id="${AGENT}-S$(printf '%03d' "$sprint_num")-${ts}"
23
+ session_path="$TASK_ROOT/${session_id}.md"
24
+
25
+ cat > "$session_path" <<EOF
26
+ # Task Session — $session_id
27
+
28
+ - agent: $AGENT
29
+ - dispatch: $dispatch_id
30
+ - sprint: $sprint_num
31
+ - source: ${SOURCE:-none}
32
+ - created_at: $(date -u +%Y-%m-%dT%H:%M:%SZ)
33
+
34
+ ## Allowed Inputs
35
+ - .harness/handoff.json
36
+ - .harness/progress.json
37
+ - assigned evidence documents only
38
+
39
+ ## Rule
40
+ - 이전 대화 기억이 아니라 문서와 evidence만 근거로 판단할 것
41
+ - 사실과 추론을 분리해서 기록할 것
42
+ EOF
43
+
44
+ bash "$SCRIPT_DIR/harness-progress-set.sh" "$PROJECT_ROOT" \
45
+ ".task_sessions.current = {\"agent\":\"$AGENT\",\"id\":\"$session_id\",\"path\":\"${session_path#$PROJECT_ROOT/}\",\"source\":$(jq -Rn --arg v "${SOURCE:-}" '$v')} |
46
+ .task_sessions.history = ((.task_sessions.history // []) + [{\"agent\":\"$AGENT\",\"id\":\"$session_id\",\"path\":\"${session_path#$PROJECT_ROOT/}\",\"source\":$(jq -Rn --arg v "${SOURCE:-}" '$v')}])" >/dev/null
47
+
48
+ echo "${session_path#$PROJECT_ROOT/}"
@@ -1,6 +1,6 @@
1
1
  #!/bin/bash
2
2
  # harness-user-prompt-submit.sh — UserPromptSubmit hook (v5 unified)
3
- # 핵심 상태 + 라우팅 지시만 주입. Solo/Team 통합.
3
+ # 핵심 상태 + 라우팅 지시만 주입. 회사 루프 기본, solo는 비상용 override.
4
4
  set -e
5
5
 
6
6
  INPUT=$(cat)
@@ -9,6 +9,7 @@ if [ -z "$CWD" ]; then CWD="$PWD"; fi
9
9
 
10
10
  # 조건 1: 하네스 초기화 확인
11
11
  if [ ! -f "$CWD/.harness/config.json" ]; then exit 0; fi
12
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
12
13
 
13
14
  # 조건 2: opt-out 플래그 확인
14
15
  AUTO_ROUTE="true"
@@ -28,6 +29,11 @@ PIPELINE="none"; CURRENT_AGENT="none"; NEXT_AGENT="none"
28
29
  SPRINT_NUM="0"; SPRINT_STATUS="init"; AGENT_STATUS="pending"
29
30
 
30
31
  if [ -f "$CWD/.harness/progress.json" ] && command -v jq >/dev/null 2>&1; then
32
+ conductor_state=$(jq -r '.conductor.state // "idle"' "$CWD/.harness/progress.json" 2>/dev/null || echo "idle")
33
+ pending_next=$(jq -r '.next_agent // "none"' "$CWD/.harness/progress.json" 2>/dev/null || echo "none")
34
+ if [ -x "$SCRIPT_DIR/conductor-tick.sh" ] && { [ "$conductor_state" = "running" ] || [ "$pending_next" = "conductor" ]; }; then
35
+ bash "$SCRIPT_DIR/conductor-tick.sh" "$CWD" >/dev/null 2>&1 || true
36
+ fi
31
37
  PIPELINE=$(jq -r '.pipeline // "none"' "$CWD/.harness/progress.json" 2>/dev/null || echo "none")
32
38
  CURRENT_AGENT=$(jq -r '.current_agent // "none"' "$CWD/.harness/progress.json" 2>/dev/null || echo "none")
33
39
  NEXT_AGENT=$(jq -r '.next_agent // "none"' "$CWD/.harness/progress.json" 2>/dev/null || echo "none")
@@ -52,22 +58,31 @@ fi
52
58
  # ── 컨텍스트 분리 가드레일 ──
53
59
  # 현재 에이전트가 활성인데 다른 에이전트 스킬을 호출하려는 경우 경고
54
60
  CONTEXT_WARNING=""
61
+ CONTEXT_BLOCK=""
55
62
  if [ "$CURRENT_AGENT" != "none" ] && [ "$CURRENT_AGENT" != "null" ] && [ "$AGENT_STATUS" = "running" ]; then
56
63
  # 프롬프트에서 /harness-* 패턴 추출
57
64
  REQUESTED_SKILL=$(echo "$PROMPT" | grep -oE '/harness-[a-z-]+' | head -1 | sed 's|/harness-||')
58
65
  if [ -n "$REQUESTED_SKILL" ] && [ "$REQUESTED_SKILL" != "$CURRENT_AGENT" ]; then
59
- CONTEXT_WARNING="
60
- ## !! Context Isolation Warning !!
66
+ CONTEXT_BLOCK="
67
+ ## Context Isolation Block
61
68
  current_agent=${CURRENT_AGENT} (running) 인데 /harness-${REQUESTED_SKILL} 호출 감지.
62
- 한 세션에서 다른 에이전트를 실행하면 컨텍스트가 오염됩니다.
69
+ 문서 기반 task session 분리를 강제하기 위해 이 호출은 차단됩니다.
63
70
  현재 에이전트를 먼저 완료(completed)하거나, 새 세션을 시작하세요."
64
71
  fi
65
72
  fi
66
73
 
74
+ if [ -n "$CONTEXT_BLOCK" ]; then
75
+ cat <<EOF
76
+ [harness] blocked | current=${CURRENT_AGENT} | requested=${REQUESTED_SKILL}
77
+ ${CONTEXT_BLOCK}
78
+ EOF
79
+ exit 0
80
+ fi
81
+
67
82
  # ── Mode 기반 분기 ──
68
- MODE="solo"
83
+ MODE="team"
69
84
  if [ -f "$CWD/.harness/progress.json" ] && command -v jq >/dev/null 2>&1; then
70
- MODE=$(jq -r '.mode // "solo"' "$CWD/.harness/progress.json" 2>/dev/null || echo "solo")
85
+ MODE=$(jq -r '.mode // "team"' "$CWD/.harness/progress.json" 2>/dev/null || echo "team")
71
86
  fi
72
87
 
73
88
  if [ "$MODE" = "team" ]; then
@@ -83,9 +98,10 @@ if [ "$MODE" = "team" ]; then
83
98
  [harness] team | ${T_PASSED}/${T_TOTAL} passed | ${T_FAILED} failed
84
99
 
85
100
  ## Team Mode Active
86
- - 3 Agent Teams이 자율적으로 Gen→Eval 루프 실행 중 (max 5 retries)
87
- - 역할: 모니터링, 실패 대응, 수동 개입
88
- - /harness-stop → 중단 | /harness-solo → Solo 전환
101
+ - worker pool(기본 3)이 자율적으로 Gen→Eval 루프 실행 중 (max 5 retries)
102
+ - CEO/Meeting/CTO/CQO/Service-Ops control-plane은 이 상한에 포함되지 않음
103
+ - 역할: 모니터링, 실패 대응, Goal 점검
104
+ - /harness-stop → 중단 | /harness-solo → 비상용 단일 에이전트 fallback
89
105
  - skip: "harness skip" 시 일반 대화
90
106
  EOF
91
107
  exit 0
@@ -97,6 +113,8 @@ cat <<EOF
97
113
  ${CONTEXT_WARNING}
98
114
  ## Route
99
115
  - pipeline=none/dispatcher 미실행 → harness-dispatcher 스킬 호출
116
+ - 기본 경로는 conductor 중심 회사 루프다: dispatch -> CEO meeting -> planner(COO) -> cto -> gen/eval -> cqo -> service-ops -> batch meeting
117
+ - conductor 는 Planner 직행 대신 meeting-manager / cto / cqo / service-ops 로 next_agent를 재작성할 수 있다
100
118
  - 기능 요청 → pipeline flow | 실수 지적 → gotcha flow | 메타 질문 → 짧게 응답 (skip)
101
119
  - 활성 pipeline → next_agent/current_agent 컨텍스트로 계속
102
120
  - skip: "harness skip", "just answer" 등 명시 시 단일 메시지 건너뜀
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: harness-brainstorming
3
3
  description: "사용자의 러프한(바이브코딩) 요구사항을 대화형으로 구체화하여 Planner가 바로 쓸 수 있는 디자인/스펙 문서(.harness/actions/brainstorm-spec.md)로 만든다. Dispatcher가 사용자에게 '브레인스토밍 필요?' 라고 확인한 뒤에만 호출된다. 원본: obra/superpowers MIT."
4
- disable-model-invocation: true
4
+ disable-model-invocation: false
5
5
  ---
6
6
 
7
7
  # Brainstormer — 요구사항 구체화 (obra/superpowers 파생)
@@ -52,9 +52,9 @@ jq '.agent_status = "completed" | .completed_agents += ["planner"]' .harness/p
52
52
  ## Session Boundary Protocol
53
53
 
54
54
  ### On Start
55
- 1. `.harness/progress.json` 읽기 — `next_agent == "brainstormer"` 인지 확인
55
+ 1. `.harness/progress.json` 읽기 — `next_agent == "brainstorming"` 인지 확인
56
56
  - 아니면 즉시 STOP + "Dispatcher 를 먼저 실행하세요" 안내
57
- 2. progress.json 업데이트: `current_agent` → `"brainstormer"`, `agent_status` → `"running"`, `updated_at` 갱신
57
+ 2. progress.json 업데이트: `current_agent` → `"brainstorming"`, `agent_status` → `"running"`, `updated_at` 갱신
58
58
  3. `.harness/memory.md` 읽기 — **프로젝트 공유 학습 규칙 적용**
59
59
  4. **Skip 조건 검사**: `.harness/actions/brainstorm-spec.md` 가 이미 존재하고
60
60
  사용자가 "새로 브레인스토밍" 을 명시하지 않았다면:
@@ -66,7 +66,7 @@ jq '.agent_status = "completed" | .completed_agents += ["planner"]' .harness/p
66
66
  1. `.harness/actions/brainstorm-spec.md` 가 존재하고 "User Review Gate" 를 통과했는지 확인
67
67
  2. progress.json 업데이트:
68
68
  - `agent_status` → `"completed"`
69
- - `completed_agents` 에 `"brainstormer"` 추가
69
+ - `completed_agents` 에 `"brainstorming"` 추가
70
70
  - `next_agent` → `"planner"`
71
71
  3. `.harness/progress.log` 에 요약 추가: `Brainstormer → Planner (spec: <경로>)`
72
72
  4. 출력: `"✓ Brainstormer 완료. brainstorm-spec.md 검토 후 승인 신호를 주세요. 승인 시 자동 핸드오프 (Conductor 자율 시동) (Planner)."`
@@ -136,13 +136,13 @@ idle ─► running ─► (waiting_meeting | waiting_owner | running) ─► co
136
136
 
137
137
  ```
138
138
  [Planner missing or sprint=0] → spawn planner
139
- [generator pending in feature row] → spawn generator-{be|fe|designer|devops}
140
- [generator done, eval pending] → spawn evaluator-{func|visual|cq|arch|sec}
139
+ [generator pending in feature row] → spawn generator-backend | generator-frontend | generator-designer | generator-devops
140
+ [generator done, eval pending] → spawn evaluator-code-quality | evaluator-functional | evaluator-visual | evaluator-architecture | evaluator-security
141
141
  [all eval PASS for feature] → next feature
142
142
  [all features PASS] → Phase Gate Meeting
143
- [Service-Ops cron due] → spawn service-ops monitor
144
- [ops-report ready] → handoff to CTO (spawn cto-review)
145
- [generator-* / eval-functional spawn 직전] → 동시 spawn service-ops/monitor (stream-mode, G-006)
143
+ [Service-Ops cron due] → spawn service-ops (requested_mode=monitor)
144
+ [ops-report ready] → handoff to CTO (spawn cto)
145
+ [generator-* / eval-functional spawn 직전] → 동시 spawn service-ops (requested_mode=monitor, stream-mode, G-006)
146
146
  [mode=team & ready ≥ 2] → 동시 spawn min(ready,3) generator/evaluator (G-005)
147
147
  ```
148
148
 
@@ -161,11 +161,12 @@ slots=$(( ready_count < 3 ? ready_count : 3 ))
161
161
 
162
162
  ### 5.2 Service-Ops monitor 동반 spawn (G-006)
163
163
 
164
- generator-{backend,frontend,frontend-flutter,devops} 또는 evaluator-functional* 을 spawn 하기 직전, **동일 tick 에서** service-ops/monitor 를 stream-mode 로 함께 spawn:
164
+ generator-backend / generator-frontend / generator-devops 또는 evaluator-functional 을 spawn 하기 직전, **동일 tick 에서** `service-ops` 를 `requested_mode=monitor` 로 함께 spawn:
165
165
 
166
166
  ```bash
167
167
  bash scripts/harness-progress-set.sh . \
168
- '.service_ops.monitor.stream_active = true |
168
+ '.service_ops.requested_mode = "monitor" |
169
+ .service_ops.monitor.stream_active = true |
169
170
  .service_ops.monitor.stream_target = "generator-frontend" |
170
171
  .agents += [{"id":"service-ops","room":"service-ops","minifigState":"watching"}]'
171
172
  ```
@@ -200,7 +201,7 @@ bash scripts/harness-progress-set.sh . \
200
201
 
201
202
  ## 7.5 모드 결정 (v6.0+, 사용자에서 이양)
202
203
 
203
- 이전에는 사용자가 `/harness-solo` 또는 `/harness-team` 으로 직접 선택했다. v6.0 부터 **Conductor 가 sprint 시작 시점에 자동 결정**한다. 사용자 override 는 가능하지만 디폴트는 자동.
204
+ 이전에는 사용자가 `/harness-solo` 또는 `/harness-team` 으로 직접 선택했다. v6.0 부터 **Conductor 가 sprint 시작 시점에 자동 결정**하며, 정상 경로는 회사형 team/company 루프다. `solo` 는 사용자 명시 시에만 들어가는 비상용 fallback 이다.
204
205
 
205
206
  ### 7.5.1 결정 시점
206
207
 
@@ -216,12 +217,7 @@ ready_at_start ≥ 3
216
217
  feature_count ≥ 6
217
218
  critical_path_depth ≤ 2
218
219
 
219
- # Solo 강제 조건 (어느 하나라도)
220
- ready_at_start ≤ 2
221
- 또는 feature_count ≤ 3
222
- 또는 critical_path_depth ≥ 4
223
-
224
- # 동률 → solo (비용 안전)
220
+ # Solo 관련 threshold 는 문서상 fallback 참고치일 뿐, auto 기본 경로는 team 유지
225
221
  ```
226
222
 
227
223
  `critical_path_depth` = feature 의존성 그래프에서 가장 긴 체인의 길이. `feature-list.json` 의 `depends_on` 으로 계산.
@@ -230,7 +226,7 @@ ready_at_start ≤ 2
230
226
 
231
227
  1. 결정 후 `progress.json` partial update:
232
228
  ```json
233
- "mode": "solo" 또는 "team",
229
+ "mode": "team" 기본, 필요 시 "solo",
234
230
  "mode_decision": {
235
231
  "owner": "conductor",
236
232
  "decided_at": "<iso>",
@@ -247,7 +243,7 @@ ready_at_start ≤ 2
247
243
 
248
244
  | 발화/명령 | 효과 |
249
245
  |---|---|
250
- | `/harness-solo` 또는 "solo 로" | mode=solo 강제, mode_decision.user_override="solo" |
246
+ | `/harness-solo` 또는 "solo 로" | mode=solo 강제, mode_decision.user_override="solo" (비상용 fallback) |
251
247
  | `/harness-team` 또는 "team 으로" | mode=team 강제, user_override="team" |
252
248
  | "auto 다시" / "Conductor 결정으로" | user_override=null, 다음 sprint 시작 시 재자동결정 |
253
249
 
@@ -90,6 +90,13 @@ CQO는 다음 짝의 평가가 일치하는지 확인:
90
90
  docmeta: { ... }
91
91
  cqo_audit:
92
92
  sprint: <n>
93
+ decision:
94
+ owner: cqo
95
+ action_type: re-evaluate | reject
96
+ rationale: <why CQO passed or rejected the build>
97
+ evidence:
98
+ - source: <artifact path>
99
+ kind: evaluation | regression | security | architecture
93
100
  per_axis_scores:
94
101
  functional: 2.85
95
102
  visual: 2.92
@@ -93,6 +93,13 @@ CTO 판단 옵션:
93
93
  docmeta: { ... }
94
94
  cto_review:
95
95
  sprint: <n>
96
+ decision:
97
+ owner: cto
98
+ action_type: implement | replan
99
+ rationale: <fact-based conclusion>
100
+ evidence:
101
+ - source: <artifact path>
102
+ kind: ops-report | meeting-record | cqo-audit
96
103
  goal_feasibility: feasible | feasible-with-recruit | infeasible
97
104
  recommended_recruits: [generator-designer, eval-security]
98
105
  arch_risks: [...]
@@ -53,9 +53,8 @@ jq '.agent_status = "completed" | .completed_agents += ["planner"]' .harness/p
53
53
  1. progress.json 업데이트:
54
54
  - `agent_status` → `"completed"`
55
55
  - `completed_agents`에 `"dispatcher"` 추가
56
- - `next_agent` → **브레인스토밍 결정 트리에 따라 결정** ([섹션 6](#6-brainstormer-routing-decision) 참조)
57
- - 신규/재플래닝 + 사용자가 브레인스토밍 선택 → `"brainstorming"`
58
- - 신규/재플래닝 + 사용자가 건너뛰기 선택 → `"planner"`
56
+ - `next_agent` → **기본은 `"meeting-manager"`**. CEO가 먼저 Cxx 회의를 소집하고, Conductor가 그 결과로 `planner(COO)` / `cto` / `cqo` / `service-ops` 를 분배한다.
57
+ - 신규/재플래닝/Goal 재정렬 → `"meeting-manager"`
59
58
  - 특정 에이전트 직접 명령 → 해당 에이전트 (예: `"evaluator-functional"`)
60
59
  - Gotcha 교정 후 재작업 → `failure.retry_target` (해당 에이전트)
61
60
  - `pipeline` → 선택된 파이프라인 (FULLSTACK/FE-ONLY/BE-ONLY)
@@ -74,7 +73,7 @@ jq '.agent_status = "completed" | .completed_agents += ["planner"]' .harness/p
74
73
  아카이빙 후 `dispatch.id` 는 `null` 로 리셋되므로, 다음 dispatcher 실행 시 새 D-NNN 이 할당된다.
75
74
  2. `.harness/progress.log`에 요약 한 줄 추가
76
75
  3. 출력: `"✓ Dispatcher 완료. 자동 핸드오프 (Conductor 자율 시동)."`
77
- 4. **즉시 내부 핸드오프 (scripts/harness-next.sh) 를 호출하여 다음 에이전트로 자동 핸드오프** (Solo 모드. Team 모드는 Lead가 별도 오케스트레이션). Brainstorming/Planner 단계가 아니면 사용자 승인 게이트 없음.
76
+ 4. **즉시 내부 핸드오프 (scripts/harness-next.sh) 를 호출하여 다음 에이전트로 자동 핸드오프**. 기본 경로는 `meeting-manager -> planner(COO) -> cto -> gen/eval -> cqo -> service-ops -> meeting-manager`.
78
77
 
79
78
  ## Auto-Routing (UserPromptSubmit Hook)
80
79
 
@@ -223,40 +222,30 @@ Dispatcher 는 사용자 요청을 분류한 뒤 아래 순서로 판단:
223
222
  ```
224
223
  1. Gotcha / 실수 지적인가?
225
224
  → YES: gotcha 기록 → next_agent = failure.retry_target (해당 에이전트)
226
- (브레인스토밍 없음)
225
+ (회의 소집 없이 재작업)
227
226
 
228
227
  2. 특정 에이전트 직접 명령인가?
229
228
  ("evaluator 다시 돌려", "generator-frontend 재작업", "planner plan.md 고쳐" 등)
230
- → YES: next_agent = <대상 에이전트> (브레인스토밍 없음)
229
+ → YES: next_agent = <대상 에이전트> (CEO 회의 우회)
231
230
 
232
- 3. Planner 가 동작해야 하는 케이스인가?
233
- (신규 파이프라인 / 신규 PRD / 기존 plan.md 대폭 수정 / 신규 feature 대규모 추가)
234
- → YES: 사용자에게 확인 질문 → 6.2 "브레인스토밍 확인 플로우"
235
- → NO: 다른 에이전트로 라우팅 (generator 이어서 등)
231
+ 3. 신규 GOAL / 재플래닝 / Goal drift / 운영 이슈인가?
232
+ → YES: next_agent = meeting-manager
233
+ (CEO가 COO/CTO/CQO/Service-Ops 회의를 먼저 소집)
236
234
 
237
- 4. 그 외 (메타/인사/Claude 자체 질문) → Dispatcher skip
238
- ```
239
-
240
- ### 6.2 브레인스토밍 확인 플로우
241
-
242
- Planner 를 호출해야 한다고 판단되면, **사용자에게 단 하나의 질문을 출력한 뒤 대기한다:**
235
+ 4. Brainstorming 이 필요한가?
236
+ → YES: Brainstorming 은 기본 진입점이 아니라 COO/Planner 내부 판단 또는
237
+ 명시적 요청일 때만 사용
243
238
 
239
+ 5. 그 외 (메타/인사/Claude 자체 질문) → Dispatcher skip
244
240
  ```
245
- 이 요청은 Planner 가 처리할 신규/재플래닝 건으로 보입니다.
246
- 러프한 요구사항을 먼저 구체화하는 Brainstormer 과정을 거칠까요?
247
241
 
248
- (Y) 예 — Brainstormer 와 대화하며 요구사항을 fit 하게 만든 뒤 Planner
249
- (N) 아니오 — 이미 PRD/OpenAPI 가 명확하므로 바로 Planner
242
+ ### 6.2 브레인스토밍 확인 플로우
250
243
 
251
- 답변: Y / N
252
- ```
244
+ 브레인스토밍은 더 이상 Dispatcher의 기본 확인 질문이 아니다.
253
245
 
254
- 사용자 응답 처리:
255
- - **Y (긍정)** — "네", "y", "yes", "필요해", "해줘" 등
256
- → `next_agent = "brainstorming"`
257
- - **N (부정)** — "아니오", "n", "no", "필요없어", "바로", "skip" 등
258
- → `next_agent = "planner"`
259
- - **불명확 / 무응답** — 한 번 더 "Y 또는 N 으로 답해주세요" 요청
246
+ - 기본값: `meeting-manager` 로 넘겨 CEO 회의 후 `planner(COO)` 가 브레인스토밍/웹리서치 필요 여부를 판단
247
+ - 예외: Owner가 명시적으로 "`/harness-brainstorming`", "브레인스토밍부터"를 요청한 경우에만 직접 `brainstorming`
248
+ - 금지: Planner 진입 전에 Brainstorming 여부를 사용자 승인 게이트로 되돌리는 것
260
249
 
261
250
  ### 6.3 Skip 케이스 정리
262
251
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: harness-evaluator-code-quality
3
3
  description: "하네스 Code-Quality Evaluator. 브라우저 없이 코드 자체를 읽어 유지보수성·모범사례 준수·아키텍처 건전성을 검사한다. BE/FE/lib 전 영역 적용. C1-C5 축으로 적대적 채점. 기준 미달 = FAIL."
4
- disable-model-invocation: true
4
+ disable-model-invocation: false
5
5
  ---
6
6
 
7
7
  # Evaluator-Code-Quality — Static Code Audit (No Browser)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: harness-evaluator-functional
3
3
  description: "하네스 Functional Evaluator. Playwright MCP(browser_*)로 실행 중인 앱을 실제 사용자처럼 조작하며 E2E 기능을 검증한다. Step 0 IA 구조 검증(Gate) → Step 1-7 기능 테스트. 기준 미달 = FAIL."
4
- disable-model-invocation: true
4
+ disable-model-invocation: false
5
5
  ---
6
6
 
7
7
  # Evaluator-Functional — Playwright MCP
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: harness-evaluator-visual
3
3
  description: "하네스 Visual Evaluator. Playwright MCP로 스크린샷, 반응형 검증, 접근성 트리 분석, AI슬롭 감지를 수행한다. Evaluator-Functional이 PASS한 후에만 실행. 기준 미달 = FAIL → Generator-Frontend 재작업."
4
- disable-model-invocation: true
4
+ disable-model-invocation: false
5
5
  ---
6
6
 
7
7
  # Evaluator-Visual — Design & Accessibility
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: harness-generator-backend
3
3
  description: "하네스 Backend Generator. 스택 독립(adaptive) — scan-result.json 의 be_stack / language 에 따라 .harness/ref/be-<stack>.md 를 로드해 runner/paths/api/validation 을 따른다. 모든 BE 스택(FastAPI / Django / Go / Rails / Phoenix / Spring / Express 등) 대응."
4
- disable-model-invocation: true
4
+ disable-model-invocation: false
5
5
  ---
6
6
 
7
7
  # Generator-Backend — Adaptive (Stack-Agnostic)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: harness-generator-frontend
3
3
  description: "하네스 Frontend Generator. 스택 독립(adaptive) — scan-result.json 의 fe_stack 에 따라 .harness/ref/fe-<stack>.md 를 로드해 해당 스택의 runner/paths/api/validation 을 따른다. 모든 FE 스택(Swift / Flutter / Vue / Svelte / Angular / 웹 SSR 등) 대응."
4
- disable-model-invocation: true
4
+ disable-model-invocation: false
5
5
  ---
6
6
 
7
7
  # Generator-Frontend — Adaptive (Stack-Agnostic)
@@ -97,6 +97,14 @@ meeting:
97
97
  - id: D-1
98
98
  text: <decision>
99
99
  vote: { agree: 0.71, override: false }
100
+ decision:
101
+ owner: planner | cto | cqo | service-ops | dispatcher
102
+ action_type: goal-alignment | replan | implement | re-evaluate | monitor | escalate-owner
103
+ rationale: <fact-based why this owner must act next>
104
+ evidence:
105
+ - source: <artifact path>
106
+ kind: ops-report | cqo-audit | cto-review | meeting-prep
107
+ drift_classification: implementation_drift | planning_drift | ops_drift | goal_drift
100
108
  action_items:
101
109
  - id: AI-1
102
110
  owner: generator-backend
@@ -119,17 +127,37 @@ meeting:
119
127
  ## 7. progress.json 추가
120
128
 
121
129
  ```json
122
- "meetings": {
130
+ "meetings": {
123
131
  "cadence": "light|normal|heavy",
124
132
  "last_standup": "<iso>",
125
133
  "next_scheduled": "<iso>",
126
134
  "active": [ { "id": "...", "type": "...", "status": "..." } ],
127
135
  "open_action_items": 0,
128
136
  "last_goal_adherence": 0.92,
137
+ "decision": {
138
+ "owner": "planner",
139
+ "action_type": "goal-alignment",
140
+ "rationale": "...",
141
+ "evidence": [],
142
+ "drift_classification": "planning_drift",
143
+ "source_path": ".harness/actions/meetings/M-.../meeting-M-....md"
144
+ },
129
145
  "manual_override": null
130
146
  }
131
147
  ```
132
148
 
149
+ ## 7.1 회의 진행 방식
150
+
151
+ Meeting-Manager는 단순히 "토론해 주세요"라고 말하지 않는다. 각 참석자에게 역할별 prep를 요청한다.
152
+
153
+ - `Dispatcher/CEO`: Goal 자체가 흔들렸는가, Owner escalation 이 필요한가
154
+ - `Planner/COO`: 기획/가설/웹리서치/레퍼런스 재검토가 필요한가
155
+ - `CTO`: 구현/아키텍처/기술선택 문제가 원인인가
156
+ - `CQO`: 품질/회귀/검증 부족이 원인인가
157
+ - `Service-Ops`: KPI/로그/incident 기준으로 어떤 drift 가 발생했는가
158
+
159
+ 회의 종료 시 `decision.owner`, `action_type`, `rationale`, `evidence`, `drift_classification` 이 비어 있으면 회의는 미완료로 본다.
160
+
133
161
  ## 8. Cron 통합 (Service-Ops 위임)
134
162
 
135
163
  Meeting-Manager 자체는 cron을 돌리지 않음. Service-Ops가 매 hourly 틱에서:
@@ -143,6 +171,7 @@ Meeting-Manager 자체는 cron을 돌리지 않음. Service-Ops가 매 hourly
143
171
 
144
172
  | Event 발신처 | 조건 | 소집 회의 |
145
173
  |---|---|---|
174
+ | Dispatcher | 신규 GOAL / 재플래닝 시작 | All-Hands (`goal-intake`) |
146
175
  | Eval-* | `## Change Request` 첨부 | Spec Review |
147
176
  | Conductor | 3회 FAIL | Spec Review (scope 축소 검토) |
148
177
  | Service-Ops | red-alert (5xx 임계 / 헬스 실패) | Incident War Room |
@@ -185,6 +214,9 @@ bash scripts/queue-enqueue.sh --owner generator-backend --feature <feature-i
185
214
  2. Action Items → queue enqueue
186
215
  3. partial update: `status = "dispatched"`, `open_action_items += N`
187
216
  4. cadence 재계산 요청 (Service-Ops에 위임)
217
+ 5. 기본 handoff 규칙:
218
+ - `goal-intake` / `goal-drift` / `spec-review` / `incident-followup` → `planner(COO)`
219
+ - `ops-batch` / `sprint-review` / `quality-fail` → `cto`
188
220
 
189
221
  ### On Archived
190
222
  1. `.harness/archive/meetings/<id>/` 로 이동
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: harness-planner
3
3
  description: "하네스 Planner 에이전트. 사용자의 프로젝트 설명을 제품 사양(plan.md), 기능 목록(feature-list.json), API 계약서(api-contract.json), AGENTS.md로 확장. pipeline.json의 planner_mode(light/full)에 따라 동작."
4
- disable-model-invocation: true
4
+ disable-model-invocation: false
5
5
  ---
6
6
 
7
- # Planner Agent
7
+ # Planner Agent (COO + HR)
8
8
 
9
9
  ## progress.json 업데이트 규칙 (v5.6.3+)
10
10
 
@@ -34,11 +34,11 @@ jq '.agent_status = "completed" | .completed_agents += ["planner"]' .harness/p
34
34
  1. progress.json 업데이트:
35
35
  - `agent_status` → `"completed"`
36
36
  - `completed_agents`에 `"planner"` 추가
37
- - `next_agent` → 파이프라인에 따라 결정 (FULLSTACK/BE-ONLY: `"generator-backend"`, FE-ONLY: `"generator-frontend"`)
37
+ - `next_agent` → `"cto"`
38
38
  2. `.harness/progress.log`에 요약 추가
39
- 3. 출력: `"✓ Planner 완료. plan.md / api-contract.json 검토 후 승인 신호를 주세요. 승인 시 자동 핸드오프 (Conductor 자율 시동)."`
40
- 4. **사용자 승인 게이트**: 사용자의 명시적 승인 ("승인", "ok", "다음", "진행", "go" 등) 을 기다린 후, **내부 핸드오프 (scripts/harness-next.sh) 를 호출하여 다음 에이전트로 자동 핸드오프**.
41
- 5. 사용자가 피드백/수정 요청을 하면 plan.md / feature-list.json / api-contract.json 을 갱신하고 다시 승인 요청. 승인 없이는 `/harness-next` 호출 금지.
39
+ 3. 출력: `"✓ Planner 완료. COO 계획안을 CTO 실행 라인으로 자동 핸드오프합니다."`
40
+ 4. **사용자 승인 게이트 없음**: Planner는 CEO 회의에서 위임받은 COO 역할이다. 완료 즉시 **내부 핸드오프 (scripts/harness-next.sh)** 로 CTO에 넘긴다.
41
+ 5. 수정 루프가 필요하면 Meeting-Manager / CTO / CQO / Service-Ops가 다시 Planner를 호출한다. Owner 승인을 기본 대기점으로 두지 않는다.
42
42
 
43
43
  ## Startup
44
44
 
@@ -61,6 +61,20 @@ jq '.agent_status = "completed" | .completed_agents += ["planner"]' .harness/p
61
61
  - 혼재/불명확 → 사용자에게 단 한 번 질문
62
62
  - 확정 후 `pipeline.json.fe_stack` 갱신 (없으면 생성)
63
63
 
64
+ ## 역할 재정의 (v6 Company Loop)
65
+
66
+ Planner는 더 이상 초기 파이프라인의 단순 1회성 spec writer가 아니다.
67
+
68
+ - **COO 역할**: Goal 정렬, 설계 허점 탐지, 브레인스토밍 필요 여부 판단
69
+ - **HR 역할**: 필요한 스킬/부서가 비어 있으면 채용/온보딩 경로 준비
70
+ - **입력 경로**:
71
+ - `meeting-manager` 의 CEO 회의 결과
72
+ - `cto` 의 hotfix / execution-plan 요청
73
+ - `service-ops` / `cqo` 로부터 올라온 재기획 요구
74
+ - **출력 경로**:
75
+ - 신규/수정된 `plan.md`, `feature-list.json`, `api-contract.json`
76
+ - CTO가 바로 실행할 수 있는 작업 분할
77
+
64
78
  ## Outputs (4개)
65
79
 
66
80
  | 파일 | 설명 |
@@ -131,7 +145,7 @@ jq '.agent_status = "completed" | .completed_agents += ["planner"]' .harness/p
131
145
 
132
146
  ## Team 병렬 스케줄링 규칙 (필수)
133
147
 
134
- Team Mode는 **최대 3팀이 동시 작업**한다. Planner는 feature-list.json 설계 시 다음 규칙을 반드시 준수한다.
148
+ Team Mode의 `3`은 **회사 전체 에이전트 수 제한이 아니라 generator/evaluator worker pool 상한**이다. Planner는 feature-list.json 설계 시 control-plane(CEO/Meeting/CTO/CQO/Service-Ops)을 제외한 **worker plane** 이 끊기지 않게 다음 규칙을 반드시 준수한다.
135
149
 
136
150
  ### 핵심 원칙: Sprint 시작 시 ready ≥ 3
137
151
 
@@ -180,5 +194,5 @@ ready가 3 미만인 Sprint가 있으면 **feature를 더 작게 분할하거나
180
194
 
181
195
  ## After Completion
182
196
 
183
- 1. 사용자에게 plan.md + api-contract.json 리뷰 요청
184
- 2. 승인 후 → Session Boundary Protocol On Complete 실행
197
+ 1. 산출물을 CTO가 즉시 실행 가능한 형태로 정리한다.
198
+ 2. Session Boundary Protocol On Complete 실행 → `next_agent = "cto"`