modscode JA

modscode / Gallery / task-orchestrator-mod

task-orchestrator-mod

Opt-in Claude Code mod for MCP Task Orchestrator: live work graph, gate band, and in-process orchestration hooks (early-access function-hooks API)

Code you can checkTerminal + desktopPaneBandStatus lineToastBoxButtonText

What it does

  • Draws a band above the prompt, a pane, toasts
  • Adds /to-band, /to-graph
  • Watches tool calls and can refuse them
  • Hooks agent.spawn, classic.PostToolUse, classic.Stop, classic.SubagentStop and 6 more
  • Keeps its own state between turns

Good points

  • No network calls
  • Written in TypeScript
  • Has a desktop-specific branch
  • Handles errors

Code to start from

Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.

Starter (register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like task-orchestrator-mod by Jeff Picklyk (pane, band, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/jpicklyk-task-orchestrator-mod/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
  // the band above the prompt; what else goes there is drawn under it
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const { Box, Button } = $.ui.resolve(e)
    const text = '…'
    return (
      <Box flexDirection="column">
        <Box>
          <Button label={`${text}`} plain />
          <Button label="Hide" />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  // the pane: open it with $.ui.open({ id: 'my-pane', title: "TO graph" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const title = '…'
    const title2 = '…'
    const title3 = '…'
    const header = '…'
    return (
      <Box flexDirection="column" paddingX={1}>
        <Box flexDirection="row" flexWrap="wrap">
          <Text dimColor>
            {" › "}
          </Text>
          <Text bold>
            {title}
          </Text>
          <Text dimColor>
            {" › "}
          </Text>
          <Text bold>
            {title2}
          </Text>
          <Text dimColor>
            {" › "}
          </Text>
          <Text bold>
            {title3}
          </Text>
        </Box>
        <Box marginBottom={1}>
          <Text>
            {header}
          </Text>
        </Box>
        <Box flexDirection="row" columnGap={1} marginBottom={1}>
          <Button label="This feature" />
          <Button label="Whole project" />
          <Button label="Hide done steps" />
          <Button label="Reconnect" />
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const itemId = '…'
    await $.ui.toast(`No active feature in this project.`)
    await $.ui.toast(`Copied ${itemId}`)
    return next(e)
  })
}

The mod's own code

Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.

claude-plugins/task-orchestrator-mod/src/band/index.ts lines 98–113 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (e.props.hasSurvey || e.props.bodyColumns < MIN_BAND_COLUMNS) return next(e)
    if (await read($, bandHidden)) return next(e)
    // The smart line while the graph is scoped to an item, else today's in-flight line (model.ts).
    const text = bandLine(await read($, graphSnapshot), e.props.bodyColumns)
    if (text === undefined) return next(e)

    const { Box, Button } = $.ui.resolve(e)

    return h(
      Box,
      null,
      h(Button, { key: 'band-open', label: text, plain: true, onPress: () => openPane($) }),
      h(Button, { key: 'hide', label: 'Hide', onPress: () => update($, bandHidden, hide) }),
    )
  })
claude-plugins/task-orchestrator-mod/src/graph-pane/index.ts lines 476–635 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE_ID }, async ($, e) => {
    const ui = $.ui.resolve(e)
    const { Box, Text, Button, Svg } = ui
    const snap = await read($, graphSnapshot)
    const status = await read($, graphStatus)
    const scope = await read($, graphScope)
    const detail = await read($, graphDetail)
    const activity = await read($, graphActivity)
    const showDone = await read($, graphShowDone)
    const remote = (await read($, graphRemote)) ?? {}
    const open = (id: string): Promise<void> => openDetail($, id)

    const view: GraphView | null = snap
    const switching = isSwitching(scope, snap)
    const model = view === null ? null : cardsOf(view, activity.working, activity.changed, activity.blocked ?? {}, remote)
    const steps = model === null ? null : stepsOf(model.cards)
    const crit: CriticalPath = model === null || steps === null || view?.overview === true ? { ids: [], edges: new Set() } : criticalPath(model.cards, steps)
    const lay = model === null || steps === null ? null : layoutTD(model.cards, steps, { bodyColumns: (e.props as { bodyColumns?: number }).bodyColumns, showDone: showDone || view?.overview === true, hasRoot: model.root !== undefined, wrap: view?.overview === true })

    // Refresh is automatic (SSE or poll); Reconnect restarts the live source and shows only while degraded.
    const controls = h(
      Box,
      { key: 'controls', flexDirection: 'row', columnGap: 1, marginBottom: 1 },
      // Two-state scope toggle; the active scope draws as the primary button.
      h(Button, {
        key: 'scope-feature',
        label: 'This feature',
        ...(scope !== null ? { variant: 'primary' } : {}),
        onPress: async () => {
          const feature = await activeFeature($)
          if (feature === null) $.ui.toast('No active feature in this project.')
          else {
            await update($, graphScope, scopeTo(feature))
            requestRefresh()
          }
        },
      }),
      h(Button, { key: 'scope-project', label: 'Whole project', ...(scope === null ? { variant: 'primary' } : {}), onPress: async () => {
        await update($, graphScope, scopeTo(null))
        requestRefresh()
      } }),
      ...(lay !== null && view?.overview !== true && lay.doneSteps.length > 0
        ? [h(Button, { key: 'done-steps', label: showDone ? 'Hide done steps' : 'Show done steps', onPress: () => update($, graphShowDone, v => !v) })]
        : []),
      ...(isDegraded(status) ? [h(Button, { key: 'reconnect', label: 'Reconnect', onPress: async () => {
        await update($, graphReconnectRequest, bump)
        requestReconnect(await read($, graphSubscribers))
      } })] : []),
    )

    if (view === null || model === null || steps === null || lay === null) {
      return h(Box, { flexDirection: 'column' }, controls, h(Text, { key: 'loading' }, status.lastError ?? 'Loading the work graph…'))
    }

    // A scope switch is still loading: say so, and draw nothing of the old scope (the header would claim it).
    if (switching) return h(Box, { flexDirection: 'column' }, controls, h(Text, { key: 'switching' }, `Loading ${loadingTitle(scope, snap)}…`))

    // With a breadcrumb the scope is named there; the header keeps the counts and the live source.
    const trail = view.trail ?? []
    const header = [...(trail.length > 0 ? [] : [scopeHeader(view)]), summaryLine(view), `live: ${status.liveSource}${status.refreshing ? ' · refreshing' : ''}`].join(' · ')
    const crumbs = trail.flatMap((c, i) => {
      const last = i === trail.length - 1
      const sep = i > 0 ? [h(Text, { key: `crumb-sep:${c.id}`, dimColor: true }, ' › ')] : []
      if (last) return [...sep, h(Text, { key: `crumb:${c.id}`, bold: true }, cut(c.title, 40))]
      const target = c.id === view.rootId ? null : c.id

      return [
        ...sep,
        h(Button, {
          key: `crumb:${c.id}`,
          label: cut(c.title, 28),
          plain: true,
          onPress: async () => {
            await update($, graphDetail, () => null)
            await update($, graphScope, scopeTo(target))
            requestRefresh()
          },
        }),
      ]
    })
    const body: unknown[] = []
    if (view.truncated) body.push(h(Text, { key: 'truncated', dimColor: true }, view.overview === true ? 'More children than shown.' : 'Large subtree: showing only the shallowest 150 items.'))
    if (view.error !== undefined) body.push(h(Text, { key: 'error', color: 'red' }, view.error))

    if (view.nodes.length === 0) {
      body.push(h(Text, { key: 'empty' }, 'No items in this scope.'))
    } else {
      body.push(
        h(
          Box,
          { key: 'legend', flexDirection: 'row', flexWrap: 'wrap', rowGap: 1, marginBottom: 1 },
          ...legendItems().map(item => h(Box, { key: `legend-${item.key}`, backgroundColor: item.color, paddingX: 1, marginRight: 1 }, h(Text, { color: '#ffffff' }, item.text))),
          h(Box, { key: 'legend-ready', backgroundColor: READY, paddingX: 1, marginRight: 1 }, h(Text, { color: '#ffffff' }, '○ ready')),
          h(Text, { key: 'legend-edges', dimColor: true }, '┄ contains   ╌ open blocker   ─ satisfied'),
          ...(crit.ids.length > 0 ? [h(Text, { key: 'legend-crit', color: CRIT_COLOR }, '   ━ critical path')] : []),
          ...(view.nodes.some(n => n.planLabel !== undefined) ? [h(Text, { key: 'legend-label', dimColor: true }, '   Tn = plan label')] : []),
        ),
      )
      if (lay.tooWide !== null) {
        body.push(h(Text, { key: 'too-wide', dimColor: true }, `Graph is ${lay.tooWide} columns wide; the pane shows ${lay.cols}. Widen the pane or open a smaller scope.`))
      }
      body.push(...canvasOf(ui, { model, lay, desktop: e.surface !== 'terminal' && Svg !== undefined, cell, steps: steps.max, open, count: view.nodes.length, overview: view.overview === true, extraChars: extrasChars(detail?.lines ?? null, trail.map(c => c.title)), crit }))
    }

    if (detail !== null) {
      // The detail is its own bordered panel: title line bold, then facts, then a row of actions.
      const facts = [
        ...detail.lines.map((line, i) => h(Text, { key: `detail-${i}`, ...(i === 0 ? { bold: true } : {}) }, line)),
        h(Text, { key: 'detail-uuid', dimColor: true }, `uuid: ${detail.itemId}`),
      ]
      const working = (activity.working[detail.itemId] ?? []).map(w =>
        h(Text, { key: `working-${w.agentId}` }, `working: ${w.seat}${w.model !== undefined ? ` · ${w.model}` : ''} · ${w.agentId === 'main' ? 'main loop' : id8(w.agentId)}`),
      )
      const actions = [
        h(Button, {
          key: 'detail-copy',
          label: 'Copy UUID',
          onPress: async press => {
            let copied = false
            try {
              const res = (await $.ui.copy({ text: detail.itemId, surface: press.surface })) as { isCopied?: boolean; value?: { isCopied?: boolean } }
              copied = res.isCopied === true || res.value?.isCopied === true
            } catch {
              copied = false
            }
            // $.ui.copy has no path on a remote surface (the desktop app) yet: fall back to the OS clipboard tool.
            if (!copied) copied = await hostCopy($, detail.itemId)
            $.ui.toast(copied ? `Copied ${detail.itemId}` : `Copy unavailable here. UUID: ${detail.itemId}`)
          },
        }),
        ...(detail.itemId !== view.scopeId
          ? [
              h(Button, {
                key: 'detail-open-graph',
                label: 'Open graph',
                onPress: async () => {
                  await update($, graphDetail, () => null)
                  await update($, graphScope, scopeTo(detail.itemId))
                  requestRefresh()
                },
              }),
            ]
          : []),
        h(Button, { key: 'detail-close', label: 'Close detail', onPress: () => update($, graphDetail, () => null) }),
      ]
      body.push(
        h(
          Box,
          { key: 'detail', flexDirection: 'column', borderStyle: 'round', borderColor: '#4b5563', paddingX: 1, marginTop: 1 },
          ...facts,
          ...working,
          h(Box, { key: 'detail-actions', flexDirection: 'row', columnGap: 1, marginTop: 1 }, ...actions),
        ),
      )
    }

    return h(
      Box,
      { flexDirection: 'column', paddingX: 1 },
      ...(crumbs.length > 0 ? [h(Box, { key: 'trail', flexDirection: 'row', flexWrap: 'wrap' }, ...crumbs)] : []),
Licence text (MIT)
MIT License
Copyright (c) 2025 Jeff Picklyk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

This code is an example in the code reference: Band above the prompt

What its code calls

runs programsreads filesenv varsdrives Claudetool callsremembers

The design, read from code

Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.

What its code shows

Read from the source at commit f606bd42d836 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.

Decides the listing: code you can check
Entry readEvery module hooks/hooks.json names was read.claude-plugins/task-orchestrator-mod/hooks/register.ts
ParsesEvery file parses as TypeScript or JavaScript.35 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs
Calls in the openNetwork and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open
For you to weigh before installing
Where it drawsThe terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both
Install lineWhether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there
Programs on WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks
NetworkWhether every fetch names its https host in the code.no network
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.claude-plugins/task-orchestrator-mod/src/graph-data/index.ts:147 a program named at run time; claude-plugins/task-orchestrator-mod/src/graph-pane/index.ts:69 a program named at run time
Reads and sendsWhether it both reads files or environment variables and reaches the network.reaches no network
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT

This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen

Install it

Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:

/plugin marketplace add jpicklyk/task-orchestrator
/plugin install task-orchestrator-mod@task-orchestrator-marketplace

This installs the marketplace's latest commit, which may not be the one read here (f606bd42d836). Compare them before you install.

Ask Claude about it

With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:

Read the modscode design "jpicklyk-task-orchestrator-mod" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs