Team Leader Nudge Guidance (team/leader-nudge-guidance.ts)

oh-my-claudecode · src/team/leader-nudge-guidance.ts · typescript · MIT
automation, ai, lang:typescript

Analyzes task and worker metrics to suggest team management actions. Use this to automate scaling or shutdown decisions for autonomous agent teams.

// Source: https://github.com/Yeachan-Heo/oh-my-claudecode | License: MIT | Copyright 2025 Yeachan Heo
// Provided via justclaw.it.com; keep this notice with the code.
export type TeamLeaderNextAction =
  | 'shutdown'
  | 'reuse-current-team'
  | 'launch-new-team'
  | 'keep-checking-status';

export interface TeamLeaderGuidanceInput {
  tasks: {
    pending: number;
    blocked: number;
    inProgress: number;
    completed: number;
    failed: number;
  };
  workers: {
    total: number;
    alive: number;
    idle: number;
    nonReporting: number;
  };
}

export interface TeamLeaderGuidance {
  nextAction: TeamLeaderNextAction;
  reason: string;
  message: string;
}

function activeTaskCount(input: TeamLeaderGuidanceInput): number {
  return input.tasks.pending + input.tasks.blocked + i

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key