feat(kugetsu): add KUGETSU_VERBOSITY for PM agent output control #95

Closed
shoko wants to merge 3 commits from feat/issue-46-verbosity-v2 into main
Owner

Summary

Fix for #46 - PM Agent verbosity control.

Changes

Add KUGETSU_VERBOSITY environment variable with three modes:

Mode Behavior
total (default) Work silently, post only final summary
verbose Post every action (current noisy behavior)
hybrid Post only on errors

Implementation

  1. Added KUGETSU_VERBOSITY variable with default total
  2. Export KUGETSU_VERBOSITY in cmd_delegate when running opencode

Usage

# Set verbosity (in ~/.kugetsu/config or ~/.kugetsu/env/default.env)
KUGETSU_VERBOSITY=total

# Or per-delegation (if PM skill supports it)
kugetsu delegate "work on #20"

PM agent skill should check KUGETSU_VERBOSITY env var and adjust posting behavior accordingly.

Fixes #46

## Summary Fix for #46 - PM Agent verbosity control. ## Changes Add `KUGETSU_VERBOSITY` environment variable with three modes: | Mode | Behavior | |------|----------| | `total` (default) | Work silently, post only final summary | | `verbose` | Post every action (current noisy behavior) | | `hybrid` | Post only on errors | ## Implementation 1. Added `KUGETSU_VERBOSITY` variable with default `total` 2. Export `KUGETSU_VERBOSITY` in `cmd_delegate` when running opencode ## Usage ```bash # Set verbosity (in ~/.kugetsu/config or ~/.kugetsu/env/default.env) KUGETSU_VERBOSITY=total # Or per-delegation (if PM skill supports it) kugetsu delegate "work on #20" ``` PM agent skill should check `KUGETSU_VERBOSITY` env var and adjust posting behavior accordingly. Fixes #46
shoko added 1 commit 2026-04-02 03:01:52 +02:00
Add KUGETSU_VERBOSITY environment variable with three modes:
- total (default): Work silently, post only final summary
- verbose: Post every action (current noisy behavior)
- hybrid: Post only on errors

Export KUGETSU_VERBOSITY in cmd_delegate so PM agent can read it.

Also includes KUGETSU_TEMP_DIR export from #92 fix.

Fixes #46
First-time contributor

I think rather than letting the agent to decide what kind of behavior it should do, we should prompt it in pm agent markdown as the prior context to the agent.

maybe we have "verbosity" markdown file as context that we can always append to the agent context. so any delegate/start/continue will read current "verbosity", then pick verbosity markdown file accordingly and attached it to the agent context. what do you think? is that makes sense?

I think rather than letting the agent to decide what kind of behavior it should do, we should prompt it in pm agent markdown as the prior context to the agent. maybe we have "verbosity" markdown file as context that we can always append to the agent context. so any delegate/start/continue will read current "verbosity", then pick verbosity markdown file accordingly and attached it to the agent context. what do you think? is that makes sense?
Author
Owner

That makes sense! The current implementation is a bit naive - it just exports KUGETSU_VERBOSITY as an env var for the PM agent but doesnt actually use it to control behavior.

A better approach:

  1. Create verbosity markdown files (e.g., $KUGETSU_DIR/verbosity/total.md, quiet.md, etc.)
  2. Have a function that reads current KUGETSU_VERBOSITY and returns the appropriate file path
  3. In cmd_delegate, read the verbosity file and append its contents to the agent context message

This way the agent gets explicit instructions based on verbosity level, rather than having to decide itself.

Ill update the PR with this approach. What verbosity levels would you suggest? e.g.:

  • total (default): all context, all logs
  • quiet: just essential info, minimal output
  • medium: somewhere in between

Or perhaps: verbose, normal, minimal?

That makes sense! The current implementation is a bit naive - it just exports KUGETSU_VERBOSITY as an env var for the PM agent but doesnt actually use it to control behavior. A better approach: 1. Create verbosity markdown files (e.g., $KUGETSU_DIR/verbosity/total.md, quiet.md, etc.) 2. Have a function that reads current KUGETSU_VERBOSITY and returns the appropriate file path 3. In cmd_delegate, read the verbosity file and append its contents to the agent context message This way the agent gets explicit instructions based on verbosity level, rather than having to decide itself. Ill update the PR with this approach. What verbosity levels would you suggest? e.g.: - total (default): all context, all logs - quiet: just essential info, minimal output - medium: somewhere in between Or perhaps: verbose, normal, minimal?
shoko added 1 commit 2026-04-02 03:48:05 +02:00
- Add VERBOSITY_DIR constant
- Add get_verbosity_context() and init_verbosity_templates() functions
- Create verbosity markdown files: total.md, medium.md, minimal.md
- Change default verbosity from 'total' to 'normal'
First-time contributor

verbose, default, quiet. what do you think?

verbose, default, quiet. what do you think?
Author
Owner

I like that naming scheme! Its more intuitive:

  • verbose: High verbosity, all context and details
  • default: Normal balanced output (this would be the default)
  • quiet: Minimal output, only essential info

Currently the implementation uses total/medium/minimal. Want me to rename them to verbose/default/quiet?

I already pushed the markdown context approach implementation. Let me know if you want me to rename the levels.

I like that naming scheme! Its more intuitive: - **verbose**: High verbosity, all context and details - **default**: Normal balanced output (this would be the default) - **quiet**: Minimal output, only essential info Currently the implementation uses total/medium/minimal. Want me to rename them to verbose/default/quiet? I already pushed the markdown context approach implementation. Let me know if you want me to rename the levels.
shoko added 1 commit 2026-04-02 04:08:26 +02:00
- Rename KUGETSU_VERBOSITY default from 'total' to 'default'
- Rename total.md -> verbose.md
- Rename medium.md -> default.md
- Keep minimal.md but update to quiet.md naming
- Update init_verbosity_templates to create verbose.md, default.md, quiet.md
han approved these changes 2026-04-02 04:36:06 +02:00
han left a comment
First-time contributor

lgtm

lgtm
shoko closed this pull request 2026-04-02 05:35:34 +02:00

Pull request closed

Sign in to join this conversation.