@walwal-harness/cli 6.0.5 → 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.
Files changed (43) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/commands/harness-solo.md +20 -20
  3. package/commands/harness-team.md +1 -1
  4. package/package.json +1 -1
  5. package/scripts/conductor-tick.sh +382 -0
  6. package/scripts/harness-archive.sh +123 -0
  7. package/scripts/harness-dashboard-up.sh +72 -0
  8. package/scripts/harness-dashboard.sh +509 -0
  9. package/scripts/harness-goal-init.sh +72 -0
  10. package/scripts/harness-goal-show.sh +37 -0
  11. package/scripts/harness-gotcha-memory.sh +348 -0
  12. package/scripts/harness-gotcha-register.sh +393 -0
  13. package/scripts/harness-meeting-doc.sh +153 -0
  14. package/scripts/harness-monitor.sh +398 -0
  15. package/scripts/harness-next.sh +577 -0
  16. package/scripts/harness-progress-set.sh +41 -0
  17. package/scripts/harness-prompt-history.sh +164 -0
  18. package/scripts/harness-queue-manager.sh +694 -0
  19. package/scripts/harness-session-start.sh +140 -0
  20. package/scripts/harness-statusline.sh +139 -0
  21. package/scripts/harness-task-session.sh +48 -0
  22. package/scripts/harness-tmux.sh +372 -0
  23. package/scripts/harness-user-prompt-submit.sh +123 -0
  24. package/scripts/init-agents-md.sh +337 -0
  25. package/scripts/init-ref-docs.sh +262 -0
  26. package/scripts/lib/harness-audit.sh +113 -0
  27. package/scripts/lib/harness-guardrail.sh +148 -0
  28. package/scripts/lib/harness-keywait.sh +57 -0
  29. package/scripts/lib/harness-render-progress.sh +346 -0
  30. package/scripts/scan-project.sh +367 -0
  31. package/skills/brainstorming/SKILL.md +4 -4
  32. package/skills/conductor/SKILL.md +12 -16
  33. package/skills/cqo/SKILL.md +7 -0
  34. package/skills/cto/SKILL.md +7 -0
  35. package/skills/dispatcher/SKILL.md +17 -28
  36. package/skills/evaluator-code-quality/SKILL.md +1 -1
  37. package/skills/evaluator-functional/SKILL.md +1 -1
  38. package/skills/evaluator-visual/SKILL.md +1 -1
  39. package/skills/generator-backend/SKILL.md +1 -1
  40. package/skills/generator-frontend/SKILL.md +1 -1
  41. package/skills/meeting-manager/SKILL.md +33 -1
  42. package/skills/planner/SKILL.md +23 -9
  43. package/skills/service-ops/SKILL.md +19 -4
@@ -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"`
@@ -90,6 +90,17 @@ Standup 종료 직후 호출됨. 직전 3회 standup의:
90
90
  - `goal_adherence < 0.5` 24h 이상 → Spec Review (긴급) 소집
91
91
  - warn 누적 ≥ 5건/Sprint → 다음 Standup에서 보고
92
92
 
93
+ ### 3.7 Drift Classification
94
+
95
+ Service-Ops는 `goal_adherence` 하락을 감지했을 때 원인 분류 없이 Planner로 넘기면 안 된다. 먼저 아래 분류를 시도한다.
96
+
97
+ - `implementation_drift`: CQO FAIL / regression / 품질 축 미달이 직접 원인
98
+ - `planning_drift`: 구현/품질은 통과했지만 Goal 달성 가설이 어긋남
99
+ - `ops_drift`: 운영 환경, 배포, 로그, incident, KPI 이상이 원인
100
+ - `goal_drift`: Goal/KPI 정의 자체가 흔들리거나 Owner intent와 괴리
101
+
102
+ 이 분류는 `progress.json.service_ops.drift_classification` 과 ops-report evidence에 기록되어야 한다.
103
+
93
104
  ---
94
105
 
95
106
  ## 4. Incident 모듈
@@ -176,6 +187,10 @@ CTO가 수신 → Hotfix/Backlog Feature로 변환 → Planner 등록.
176
187
 
177
188
  ```json
178
189
  "service_ops": {
190
+ "drift_classification": "planning_drift",
191
+ "evidence": [
192
+ { "source": ".harness/actions/ops-report-3.md", "kind": "ops-report" }
193
+ ],
179
194
  "monitor": {
180
195
  "last_check": "<iso>",
181
196
  "cadence_decided": "normal",
@@ -221,15 +236,15 @@ CTO가 수신 → Hotfix/Backlog Feature로 변환 → Planner 등록.
221
236
  ## 9. Conductor와의 인터페이스
222
237
 
223
238
  - Conductor 틱에서:
224
- - cron 도달 → spawn `service-ops/monitor`
225
- - red-alert 이벤트 → spawn `service-ops/incident`
226
- - Sprint 종료 → spawn `service-ops/auto-retro`
239
+ - cron 도달 → spawn `service-ops` + `service_ops.requested_mode="monitor"`
240
+ - red-alert 이벤트 → spawn `service-ops` + `service_ops.requested_mode="incident"`
241
+ - Sprint 종료 → spawn `service-ops` + `service_ops.requested_mode="auto-retro"`
227
242
  - 모든 Service-Ops 산출물은 CTO 경유로만 코드 변경에 도달
228
243
 
229
244
  ## 10. Session Boundary Protocol
230
245
 
231
246
  ### On Start
232
- 1. `.harness/progress.json` 읽기 → 어느 모듈 호출인지 확인 (`mode = monitor|incident|auto-retro`)
247
+ 1. `.harness/progress.json` 읽기 → 어느 모듈 호출인지 확인 (`service_ops.requested_mode = monitor|incident|auto-retro`)
233
248
  2. partial update: `current_agent = "service-ops"`, `service_ops.<mode>.running = true`
234
249
 
235
250
  ### On Complete