@walwal-harness/cli 6.0.5 → 6.1.1
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/CHANGELOG.md +65 -0
- package/commands/harness-solo.md +20 -20
- package/commands/harness-team.md +1 -1
- package/gotchas/coo-developer.md +13 -0
- package/gotchas/documentationer.md +13 -0
- package/package.json +1 -1
- package/scripts/conductor-tick.sh +416 -0
- package/scripts/harness-archive.sh +123 -0
- package/scripts/harness-dashboard-up.sh +72 -0
- package/scripts/harness-dashboard.sh +509 -0
- package/scripts/harness-goal-init.sh +72 -0
- package/scripts/harness-goal-show.sh +37 -0
- package/scripts/harness-gotcha-memory.sh +348 -0
- package/scripts/harness-gotcha-register.sh +393 -0
- package/scripts/harness-meeting-doc.sh +153 -0
- package/scripts/harness-monitor.sh +398 -0
- package/scripts/harness-next.sh +577 -0
- package/scripts/harness-progress-set.sh +41 -0
- package/scripts/harness-prompt-history.sh +164 -0
- package/scripts/harness-queue-manager.sh +694 -0
- package/scripts/harness-session-start.sh +140 -0
- package/scripts/harness-statusline.sh +139 -0
- package/scripts/harness-task-session.sh +48 -0
- package/scripts/harness-tmux.sh +372 -0
- package/scripts/harness-user-prompt-submit.sh +123 -0
- package/scripts/init-agents-md.sh +337 -0
- package/scripts/init-ref-docs.sh +262 -0
- package/scripts/lib/harness-audit.sh +113 -0
- package/scripts/lib/harness-guardrail.sh +148 -0
- package/scripts/lib/harness-keywait.sh +57 -0
- package/scripts/lib/harness-render-progress.sh +346 -0
- package/scripts/scan-project.sh +367 -0
- package/skills/brainstorming/SKILL.md +4 -4
- package/skills/conductor/SKILL.md +19 -16
- package/skills/coo-developer/SKILL.md +42 -0
- package/skills/cqo/SKILL.md +7 -0
- package/skills/cto/SKILL.md +7 -0
- package/skills/dispatcher/SKILL.md +17 -28
- package/skills/dispatcher/persona-ceo.md +2 -1
- package/skills/documentationer/SKILL.md +46 -0
- package/skills/evaluator-code-quality/SKILL.md +1 -1
- package/skills/evaluator-functional/SKILL.md +1 -1
- package/skills/evaluator-visual/SKILL.md +1 -1
- package/skills/generator-backend/SKILL.md +1 -1
- package/skills/generator-frontend/SKILL.md +1 -1
- package/skills/meeting-manager/SKILL.md +34 -1
- package/skills/planner/SKILL.md +23 -9
- package/skills/planner/persona-coo-hr.md +17 -0
- package/skills/service-ops/SKILL.md +19 -4
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# harness-prompt-history.sh — User Prompt History pane
|
|
3
|
+
# 사용자가 입력한 프롬프트만 표시 + 현재 처리 단계(Planner/Team) 표시
|
|
4
|
+
# Usage: bash scripts/harness-prompt-history.sh [project-root]
|
|
5
|
+
|
|
6
|
+
set -uo pipefail
|
|
7
|
+
|
|
8
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
9
|
+
source "$SCRIPT_DIR/lib/harness-render-progress.sh"
|
|
10
|
+
source "$SCRIPT_DIR/lib/harness-keywait.sh"
|
|
11
|
+
|
|
12
|
+
PROJECT_ROOT="${1:-}"
|
|
13
|
+
if [ -z "$PROJECT_ROOT" ]; then
|
|
14
|
+
PROJECT_ROOT="$(resolve_harness_root ".")" || { echo "[history] .harness/ not found."; exit 1; }
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
PROGRESS_LOG="$PROJECT_ROOT/.harness/progress.log"
|
|
18
|
+
PROGRESS="$PROJECT_ROOT/.harness/progress.json"
|
|
19
|
+
QUEUE="$PROJECT_ROOT/.harness/actions/feature-queue.json"
|
|
20
|
+
|
|
21
|
+
BOLD="\033[1m"
|
|
22
|
+
DIM="\033[2m"
|
|
23
|
+
GREEN="\033[32m"
|
|
24
|
+
YELLOW="\033[33m"
|
|
25
|
+
RED="\033[31m"
|
|
26
|
+
CYAN="\033[36m"
|
|
27
|
+
MAGENTA="\033[35m"
|
|
28
|
+
WHITE="\033[37m"
|
|
29
|
+
RESET="\033[0m"
|
|
30
|
+
BG_BLUE="\033[44m"
|
|
31
|
+
BG_GREEN="\033[42m"
|
|
32
|
+
BG_YELLOW="\033[43m"
|
|
33
|
+
|
|
34
|
+
render_header() {
|
|
35
|
+
echo -e "${BOLD}USER PROMPTS${RESET} ${DIM}$(date +%H:%M:%S)${RESET}"
|
|
36
|
+
echo ""
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
# 현재 처리 상태 배지
|
|
40
|
+
render_processing_status() {
|
|
41
|
+
local mode="solo" current_agent="none" agent_status="pending"
|
|
42
|
+
|
|
43
|
+
if [ -f "$PROGRESS" ] && command -v jq &>/dev/null; then
|
|
44
|
+
mode=$(jq -r '.mode // "solo"' "$PROGRESS" 2>/dev/null)
|
|
45
|
+
current_agent=$(jq -r '.current_agent // "none"' "$PROGRESS" 2>/dev/null)
|
|
46
|
+
agent_status=$(jq -r '.agent_status // "pending"' "$PROGRESS" 2>/dev/null)
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
local badge=""
|
|
50
|
+
case "$mode" in
|
|
51
|
+
team)
|
|
52
|
+
# Team 모드: 각 팀의 현재 상태 표시
|
|
53
|
+
badge="${BG_BLUE}${WHITE}${BOLD} TEAM MODE ${RESET}"
|
|
54
|
+
if [ -f "$QUEUE" ]; then
|
|
55
|
+
local team_info=""
|
|
56
|
+
for i in 1 2 3; do
|
|
57
|
+
local t_status t_feature t_phase
|
|
58
|
+
t_status=$(jq -r ".teams[\"$i\"].status // \"idle\"" "$QUEUE" 2>/dev/null)
|
|
59
|
+
t_feature=$(jq -r ".teams[\"$i\"].feature // \"\"" "$QUEUE" 2>/dev/null)
|
|
60
|
+
if [ "$t_status" = "busy" ] && [ -n "$t_feature" ] && [ "$t_feature" != "null" ]; then
|
|
61
|
+
t_phase=$(jq -r --arg f "$t_feature" '.queue.in_progress[$f].phase // "?"' "$QUEUE" 2>/dev/null)
|
|
62
|
+
team_info+=" ${CYAN}T${i}${RESET}:${t_feature}(${t_phase})"
|
|
63
|
+
else
|
|
64
|
+
team_info+=" ${DIM}T${i}:idle${RESET}"
|
|
65
|
+
fi
|
|
66
|
+
done
|
|
67
|
+
echo -e " ${badge}${team_info}"
|
|
68
|
+
else
|
|
69
|
+
echo -e " ${badge}"
|
|
70
|
+
fi
|
|
71
|
+
;;
|
|
72
|
+
paused)
|
|
73
|
+
echo -e " ${BG_YELLOW}${WHITE}${BOLD} PAUSED ${RESET} ${DIM}/harness-team 또는 /harness-solo${RESET}"
|
|
74
|
+
;;
|
|
75
|
+
*)
|
|
76
|
+
# Solo 모드: 현재 에이전트 표시
|
|
77
|
+
if [ "$current_agent" != "none" ] && [ "$current_agent" != "null" ]; then
|
|
78
|
+
local agent_color="$RESET"
|
|
79
|
+
case "$current_agent" in
|
|
80
|
+
planner*) agent_color="$YELLOW" ;;
|
|
81
|
+
generator*) agent_color="$GREEN" ;;
|
|
82
|
+
eval*) agent_color="$RED" ;;
|
|
83
|
+
dispatcher*) agent_color="$MAGENTA" ;;
|
|
84
|
+
esac
|
|
85
|
+
local status_icon="·"
|
|
86
|
+
case "$agent_status" in
|
|
87
|
+
running) status_icon="▶" ;;
|
|
88
|
+
completed) status_icon="✓" ;;
|
|
89
|
+
failed) status_icon="✗" ;;
|
|
90
|
+
esac
|
|
91
|
+
echo -e " ${BG_GREEN}${WHITE}${BOLD} SOLO ${RESET} ${agent_color}${status_icon} ${current_agent}${RESET}"
|
|
92
|
+
else
|
|
93
|
+
echo -e " ${BG_GREEN}${WHITE}${BOLD} SOLO ${RESET} ${DIM}대기 중${RESET}"
|
|
94
|
+
fi
|
|
95
|
+
;;
|
|
96
|
+
esac
|
|
97
|
+
echo ""
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
# 사용자 프롬프트만 필터하여 표시 (newest first, 전체 출력)
|
|
101
|
+
render_user_prompts() {
|
|
102
|
+
if [ ! -f "$PROGRESS_LOG" ]; then
|
|
103
|
+
echo -e " ${DIM}(프롬프트 기록 없음)${RESET}"
|
|
104
|
+
return
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
# user-prompt 행만 필터 → tac으로 newest first
|
|
108
|
+
local prompts
|
|
109
|
+
prompts=$(grep '| user-prompt |' "$PROGRESS_LOG" 2>/dev/null | tac)
|
|
110
|
+
|
|
111
|
+
if [ -z "$prompts" ]; then
|
|
112
|
+
echo -e " ${DIM}(사용자 프롬프트 없음)${RESET}"
|
|
113
|
+
return
|
|
114
|
+
fi
|
|
115
|
+
|
|
116
|
+
local total_prompts
|
|
117
|
+
total_prompts=$(echo "$prompts" | wc -l | tr -d ' ')
|
|
118
|
+
|
|
119
|
+
# 터미널 폭: main loop에서 측정한 _COLS 사용 (subshell 내 tput 불가 대비)
|
|
120
|
+
local max_width=$(( ${_COLS:-80} - 12 ))
|
|
121
|
+
if [ "$max_width" -lt 20 ]; then max_width=20; fi
|
|
122
|
+
|
|
123
|
+
echo "$prompts" | while IFS= read -r line; do
|
|
124
|
+
local ts detail
|
|
125
|
+
ts=$(echo "$line" | awk -F'|' '{gsub(/^ +| +$/,"",$1); print $1}')
|
|
126
|
+
detail=$(echo "$line" | awk -F'|' '{gsub(/^ +| +$/,"",$4); print $4}')
|
|
127
|
+
|
|
128
|
+
local short_ts
|
|
129
|
+
short_ts=$(echo "$ts" | grep -oE '[0-9]{2}:[0-9]{2}' | tail -1 || echo "$ts")
|
|
130
|
+
|
|
131
|
+
if [ ${#detail} -gt "$max_width" ]; then
|
|
132
|
+
detail="${detail:0:$((max_width - 2))}.."
|
|
133
|
+
fi
|
|
134
|
+
|
|
135
|
+
echo -e " ${DIM}${short_ts}${RESET} ${WHITE}${detail}${RESET}"
|
|
136
|
+
done
|
|
137
|
+
|
|
138
|
+
echo ""
|
|
139
|
+
echo -e " ${DIM}── ${total_prompts} prompts total ──${RESET}"
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
render_all() {
|
|
143
|
+
render_header
|
|
144
|
+
render_processing_status
|
|
145
|
+
render_user_prompts
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
# ── Main loop ──
|
|
149
|
+
tput civis 2>/dev/null
|
|
150
|
+
trap 'tput cnorm 2>/dev/null; exit 0' EXIT INT TERM
|
|
151
|
+
clear
|
|
152
|
+
|
|
153
|
+
while true; do
|
|
154
|
+
# subshell 내 tput 불가 → 미리 터미널 크기 측정
|
|
155
|
+
_ROWS=$(tput lines 2>/dev/null || echo 30)
|
|
156
|
+
_COLS=$(tput cols 2>/dev/null || echo 80)
|
|
157
|
+
export _ROWS _COLS
|
|
158
|
+
buf=$(render_all 2>&1)
|
|
159
|
+
tput cup 0 0 2>/dev/null
|
|
160
|
+
echo "$buf"
|
|
161
|
+
tput ed 2>/dev/null
|
|
162
|
+
printf "${DIM} [r] refresh [q] quit${RESET}\033[K\n"
|
|
163
|
+
wait_or_refresh 3 || true
|
|
164
|
+
done
|