From 5c9c791142b93fd86f2adbc1b3f792069d6e7618 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Thu, 2 Apr 2026 03:31:47 +0000 Subject: [PATCH 1/4] feat(kugetsu): add KUGETSU_VERBOSITY for PM agent output control --- skills/kugetsu/scripts/kugetsu | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skills/kugetsu/scripts/kugetsu b/skills/kugetsu/scripts/kugetsu index 7fbed5b..eb0d1a2 100755 --- a/skills/kugetsu/scripts/kugetsu +++ b/skills/kugetsu/scripts/kugetsu @@ -10,6 +10,7 @@ NOTIFICATIONS_FILE="$KUGETSU_DIR/notifications.json" LOGS_DIR="$KUGETSU_DIR/logs" ENV_DIR="${ENV_DIR:-$KUGETSU_DIR/env}" MAX_CONCURRENT_AGENTS="${MAX_CONCURRENT_AGENTS:-3}" +KUGETSU_VERBOSITY="${KUGETSU_VERBOSITY:-total}" # Load user config overrides (~/.kugetsu/config) if [ -f "$KUGETSU_DIR/config" ]; then @@ -547,6 +548,7 @@ cmd_status() { cmd_delegate() { local message="${1:-}" + local verbosity="${KUGETSU_VERBOSITY:-total}" if [ -z "$message" ]; then echo "Error: message is required" >&2 @@ -566,7 +568,7 @@ cmd_delegate() { local temp_dir="${KUGETSU_TEMP_DIR:-$HOME/.local/share/opencode/tool-output}" mkdir -p "$ENV_DIR" - local env_sh="set -a; export KUGETSU_TEMP_DIR='$temp_dir'; " + local env_sh="set -a; export KUGETSU_TEMP_DIR='$temp_dir'; export KUGETSU_VERBOSITY='$verbosity'; " if [ -f "$ENV_DIR/pm-agent.env" ]; then env_sh="${env_sh}source '$ENV_DIR/pm-agent.env'; " elif [ -f "$ENV_DIR/default.env" ]; then @@ -577,6 +579,7 @@ cmd_delegate() { nohup sh -c "${env_sh}opencode run '$message' --continue --session '$pm_session' >> '$log_file' 2>&1" > /dev/null 2>&1 & disown echo "Delegated to PM agent (logged to $(basename "$log_file"))" + echo "Verbosity: $verbosity" } cmd_logs() { -- 2.49.1 From d64524c8509672f302420966de1eee5ed148d553 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Thu, 2 Apr 2026 03:31:56 +0000 Subject: [PATCH 2/4] feat(kugetsu): add verbosity markdown context approach --- skills/kugetsu/scripts/kugetsu | 66 +++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/skills/kugetsu/scripts/kugetsu b/skills/kugetsu/scripts/kugetsu index eb0d1a2..4eef300 100755 --- a/skills/kugetsu/scripts/kugetsu +++ b/skills/kugetsu/scripts/kugetsu @@ -9,6 +9,7 @@ INDEX_FILE="$KUGETSU_DIR/index.json" NOTIFICATIONS_FILE="$KUGETSU_DIR/notifications.json" LOGS_DIR="$KUGETSU_DIR/logs" ENV_DIR="${ENV_DIR:-$KUGETSU_DIR/env}" +VERBOSITY_DIR="$KUGETSU_DIR/verbosity" MAX_CONCURRENT_AGENTS="${MAX_CONCURRENT_AGENTS:-3}" KUGETSU_VERBOSITY="${KUGETSU_VERBOSITY:-total}" @@ -546,6 +547,62 @@ cmd_status() { echo "ok" } +get_verbosity_context() { + local verbosity="${KUGETSU_VERBOSITY:-total}" + local verbosity_file="$VERBOSITY_DIR/${verbosity}.md" + + if [ -f "$verbosity_file" ]; then + cat "$verbosity_file" + else + echo "## Verbosity: $verbosity" + echo "Verbosity level: $verbosity" + fi +} + +init_verbosity_templates() { + mkdir -p "$VERBOSITY_DIR" + + if [ ! -f "$VERBOSITY_DIR/total.md" ]; then + cat > "$VERBOSITY_DIR/total.md" << 'EOF' +## Verbosity: Total + +You are operating in HIGH verbosity mode. Include ALL available context: +- Full command outputs and their results +- Detailed reasoning and thinking process +- All file changes with diffs when relevant +- Complete log excerpts +- Comprehensive status updates +- Ask clarifying questions when uncertain +EOF + fi + + if [ ! -f "$VERBOSITY_DIR/medium.md" ]; then + cat > "$VERBOSITY_DIR/medium.md" << 'EOF' +## Verbosity: Medium + +You are operating in MEDIUM verbosity mode. Provide balanced output: +- Standard command outputs and key results +- Moderate reasoning detail +- Important file changes summarized +- Relevant log excerpts (not full) +- Regular status updates +EOF + fi + + if [ ! -f "$VERBOSITY_DIR/quiet.md" ]; then + cat > "$VERBOSITY_DIR/quiet.md" << 'EOF' +## Verbosity: Quiet + +You are operating in QUIET/MINIMAL verbosity mode. Keep output minimal: +- Only essential information +- Brief status updates (1-2 sentences) +- Final decisions only +- Yes/No answers when appropriate +- Skip detailed explanations unless requested +EOF + fi +} + cmd_delegate() { local message="${1:-}" local verbosity="${KUGETSU_VERBOSITY:-total}" @@ -568,6 +625,13 @@ cmd_delegate() { local temp_dir="${KUGETSU_TEMP_DIR:-$HOME/.local/share/opencode/tool-output}" mkdir -p "$ENV_DIR" + init_verbosity_templates + + local verbosity_context=$(get_verbosity_context) + local full_message="${verbosity_context} + +${message}" + local env_sh="set -a; export KUGETSU_TEMP_DIR='$temp_dir'; export KUGETSU_VERBOSITY='$verbosity'; " if [ -f "$ENV_DIR/pm-agent.env" ]; then env_sh="${env_sh}source '$ENV_DIR/pm-agent.env'; " @@ -576,7 +640,7 @@ cmd_delegate() { fi env_sh="${env_sh}set +a; " - nohup sh -c "${env_sh}opencode run '$message' --continue --session '$pm_session' >> '$log_file' 2>&1" > /dev/null 2>&1 & + nohup sh -c "${env_sh}opencode run '$full_message' --continue --session '$pm_session' >> '$log_file' 2>&1" > /dev/null 2>&1 & disown echo "Delegated to PM agent (logged to $(basename "$log_file"))" echo "Verbosity: $verbosity" -- 2.49.1 From d54f1708f33b6f2d172c000f2053c86d482ad575 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Thu, 2 Apr 2026 03:32:06 +0000 Subject: [PATCH 3/4] feat(kugetsu): rename verbosity levels to verbose/default/quiet --- skills/kugetsu/scripts/kugetsu | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/skills/kugetsu/scripts/kugetsu b/skills/kugetsu/scripts/kugetsu index 4eef300..8092b0d 100755 --- a/skills/kugetsu/scripts/kugetsu +++ b/skills/kugetsu/scripts/kugetsu @@ -11,7 +11,7 @@ LOGS_DIR="$KUGETSU_DIR/logs" ENV_DIR="${ENV_DIR:-$KUGETSU_DIR/env}" VERBOSITY_DIR="$KUGETSU_DIR/verbosity" MAX_CONCURRENT_AGENTS="${MAX_CONCURRENT_AGENTS:-3}" -KUGETSU_VERBOSITY="${KUGETSU_VERBOSITY:-total}" +KUGETSU_VERBOSITY="${KUGETSU_VERBOSITY:-default}" # Load user config overrides (~/.kugetsu/config) if [ -f "$KUGETSU_DIR/config" ]; then @@ -548,23 +548,22 @@ cmd_status() { } get_verbosity_context() { - local verbosity="${KUGETSU_VERBOSITY:-total}" + local verbosity="${KUGETSU_VERBOSITY:-default}" local verbosity_file="$VERBOSITY_DIR/${verbosity}.md" if [ -f "$verbosity_file" ]; then cat "$verbosity_file" else echo "## Verbosity: $verbosity" - echo "Verbosity level: $verbosity" fi } init_verbosity_templates() { mkdir -p "$VERBOSITY_DIR" - if [ ! -f "$VERBOSITY_DIR/total.md" ]; then - cat > "$VERBOSITY_DIR/total.md" << 'EOF' -## Verbosity: Total + if [ ! -f "$VERBOSITY_DIR/verbose.md" ]; then + cat > "$VERBOSITY_DIR/verbose.md" << 'EOF' +## Verbosity: Verbose You are operating in HIGH verbosity mode. Include ALL available context: - Full command outputs and their results @@ -576,15 +575,14 @@ You are operating in HIGH verbosity mode. Include ALL available context: EOF fi - if [ ! -f "$VERBOSITY_DIR/medium.md" ]; then - cat > "$VERBOSITY_DIR/medium.md" << 'EOF' -## Verbosity: Medium + if [ ! -f "$VERBOSITY_DIR/default.md" ]; then + cat > "$VERBOSITY_DIR/default.md" << 'EOF' +## Verbosity: Default -You are operating in MEDIUM verbosity mode. Provide balanced output: +You are operating in NORMAL verbosity mode. Provide balanced output: - Standard command outputs and key results - Moderate reasoning detail - Important file changes summarized -- Relevant log excerpts (not full) - Regular status updates EOF fi @@ -593,19 +591,18 @@ EOF cat > "$VERBOSITY_DIR/quiet.md" << 'EOF' ## Verbosity: Quiet -You are operating in QUIET/MINIMAL verbosity mode. Keep output minimal: +You are operating in QUIET verbosity mode. Keep output minimal: - Only essential information - Brief status updates (1-2 sentences) - Final decisions only - Yes/No answers when appropriate -- Skip detailed explanations unless requested EOF fi } cmd_delegate() { local message="${1:-}" - local verbosity="${KUGETSU_VERBOSITY:-total}" + local verbosity="${KUGETSU_VERBOSITY:-default}" if [ -z "$message" ]; then echo "Error: message is required" >&2 -- 2.49.1 From 40f4e2e5b40ddeb1c11b88d65cd8f884b1d02b12 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Thu, 2 Apr 2026 03:38:18 +0000 Subject: [PATCH 4/4] docs: add KUGETSU_VERBOSITY to config template --- skills/kugetsu/scripts/kugetsu | 3 +++ 1 file changed, 3 insertions(+) diff --git a/skills/kugetsu/scripts/kugetsu b/skills/kugetsu/scripts/kugetsu index 8092b0d..74dfa52 100755 --- a/skills/kugetsu/scripts/kugetsu +++ b/skills/kugetsu/scripts/kugetsu @@ -1054,6 +1054,9 @@ cmd_init() { # Max concurrent dev agents (default: 3) # MAX_CONCURRENT_AGENTS=5 +# Verbosity level for PM agent output (default, verbose, or quiet) +# KUGETSU_VERBOSITY=default + # Git server configurations # Format: GIT_SERVERS["hostname"]="https://hostname" # Add servers with: kugetsu server add -- 2.49.1