feat(kugetsu): add KUGETSU_VERBOSITY for PM agent output control #102
@@ -11,7 +11,7 @@ LOGS_DIR="$KUGETSU_DIR/logs"
|
|||||||
ENV_DIR="${ENV_DIR:-$KUGETSU_DIR/env}"
|
ENV_DIR="${ENV_DIR:-$KUGETSU_DIR/env}"
|
||||||
VERBOSITY_DIR="$KUGETSU_DIR/verbosity"
|
VERBOSITY_DIR="$KUGETSU_DIR/verbosity"
|
||||||
MAX_CONCURRENT_AGENTS="${MAX_CONCURRENT_AGENTS:-3}"
|
MAX_CONCURRENT_AGENTS="${MAX_CONCURRENT_AGENTS:-3}"
|
||||||
KUGETSU_VERBOSITY="${KUGETSU_VERBOSITY:-total}"
|
KUGETSU_VERBOSITY="${KUGETSU_VERBOSITY:-default}"
|
||||||
|
|
||||||
# Load user config overrides (~/.kugetsu/config)
|
# Load user config overrides (~/.kugetsu/config)
|
||||||
if [ -f "$KUGETSU_DIR/config" ]; then
|
if [ -f "$KUGETSU_DIR/config" ]; then
|
||||||
@@ -548,23 +548,22 @@ cmd_status() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get_verbosity_context() {
|
get_verbosity_context() {
|
||||||
local verbosity="${KUGETSU_VERBOSITY:-total}"
|
local verbosity="${KUGETSU_VERBOSITY:-default}"
|
||||||
local verbosity_file="$VERBOSITY_DIR/${verbosity}.md"
|
local verbosity_file="$VERBOSITY_DIR/${verbosity}.md"
|
||||||
|
|
||||||
if [ -f "$verbosity_file" ]; then
|
if [ -f "$verbosity_file" ]; then
|
||||||
cat "$verbosity_file"
|
cat "$verbosity_file"
|
||||||
else
|
else
|
||||||
echo "## Verbosity: $verbosity"
|
echo "## Verbosity: $verbosity"
|
||||||
echo "Verbosity level: $verbosity"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
init_verbosity_templates() {
|
init_verbosity_templates() {
|
||||||
mkdir -p "$VERBOSITY_DIR"
|
mkdir -p "$VERBOSITY_DIR"
|
||||||
|
|
||||||
if [ ! -f "$VERBOSITY_DIR/total.md" ]; then
|
if [ ! -f "$VERBOSITY_DIR/verbose.md" ]; then
|
||||||
cat > "$VERBOSITY_DIR/total.md" << 'EOF'
|
cat > "$VERBOSITY_DIR/verbose.md" << 'EOF'
|
||||||
## Verbosity: Total
|
## Verbosity: Verbose
|
||||||
|
|
||||||
You are operating in HIGH verbosity mode. Include ALL available context:
|
You are operating in HIGH verbosity mode. Include ALL available context:
|
||||||
- Full command outputs and their results
|
- Full command outputs and their results
|
||||||
@@ -576,15 +575,14 @@ You are operating in HIGH verbosity mode. Include ALL available context:
|
|||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$VERBOSITY_DIR/medium.md" ]; then
|
if [ ! -f "$VERBOSITY_DIR/default.md" ]; then
|
||||||
cat > "$VERBOSITY_DIR/medium.md" << 'EOF'
|
cat > "$VERBOSITY_DIR/default.md" << 'EOF'
|
||||||
## Verbosity: Medium
|
## 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
|
- Standard command outputs and key results
|
||||||
- Moderate reasoning detail
|
- Moderate reasoning detail
|
||||||
- Important file changes summarized
|
- Important file changes summarized
|
||||||
- Relevant log excerpts (not full)
|
|
||||||
- Regular status updates
|
- Regular status updates
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
@@ -593,19 +591,18 @@ EOF
|
|||||||
cat > "$VERBOSITY_DIR/quiet.md" << 'EOF'
|
cat > "$VERBOSITY_DIR/quiet.md" << 'EOF'
|
||||||
## Verbosity: Quiet
|
## 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
|
- Only essential information
|
||||||
- Brief status updates (1-2 sentences)
|
- Brief status updates (1-2 sentences)
|
||||||
- Final decisions only
|
- Final decisions only
|
||||||
- Yes/No answers when appropriate
|
- Yes/No answers when appropriate
|
||||||
- Skip detailed explanations unless requested
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_delegate() {
|
cmd_delegate() {
|
||||||
local message="${1:-}"
|
local message="${1:-}"
|
||||||
local verbosity="${KUGETSU_VERBOSITY:-total}"
|
local verbosity="${KUGETSU_VERBOSITY:-default}"
|
||||||
|
|
||||||
if [ -z "$message" ]; then
|
if [ -z "$message" ]; then
|
||||||
echo "Error: message is required" >&2
|
echo "Error: message is required" >&2
|
||||||
|
|||||||
Reference in New Issue
Block a user