ledger
The record of orchestrated work: runs of units and tasks, the subagents spawned for them, each gate's verdict and the findings reviewers report, summed up in the status line while there is something to say. It can follow a superpowers plan…
What it does
- Draws a pane, toasts
- Adds /ledger
- Watches Write, Edit calls and can refuse them
- Hooks agent.spawn, prompt.compose, session.start, turn.complete and 1 more
- Keeps its own state between turns
Good points
- No network calls
- Starts no processes
- Written in TypeScript
- 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)
import type { Register } from 'claude-code'
// Drawn like ledger by Kuang Tar Lim (pane, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/buddylim-ledger/
// 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 pane: open it with $.ui.open({ id: 'my-pane', title: "Ledger" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const id = '…'
const done = '…'
const tasks = '…'
const tokensText = '…'
const path = '…'
const name = '…'
const mark = '…'
const done2 = '…'
const tasks2 = '…'
const name2 = '…'
const done3 = '…'
const tasks3 = '…'
const name3 = '…'
const done4 = '…'
const tasks4 = '…'
const name4 = '…'
const length = '…'
const length2 = '…'
const about = '…'
const title = '…'
const note = '…'
const spawnMeta = '…'
const text = '…'
const text2 = '…'
const text3 = '…'
const outcome = '…'
const note2 = '…'
const filter = '…'
const mark2 = '…'
const id2 = '…'
const title2 = '…'
const note3 = '…'
const spawnMeta2 = '…'
const text4 = '…'
const text5 = '…'
const text6 = '…'
const outcome2 = '…'
const note4 = '…'
const filter2 = '…'
const mark3 = '…'
const id3 = '…'
const title3 = '…'
const note5 = '…'
const spawnMeta3 = '…'
const text7 = '…'
const text8 = '…'
const text9 = '…'
const outcome3 = '…'
const note6 = '…'
const filter3 = '…'
const name5 = '…'
const done5 = '…'
const tasks5 = '…'
const name6 = '…'
const done6 = '…'
const tasks6 = '…'
const name7 = '…'
const done7 = '…'
const tasks7 = '…'
const name8 = '…'
const length3 = '…'
const length4 = '…'
const about2 = '…'
const mark4 = '…'
const id4 = '…'
const title4 = '…'
const note7 = '…'
const spawnMeta4 = '…'
const text10 = '…'
const text11 = '…'
const text12 = '…'
const outcome4 = '…'
const note8 = '…'
const filter4 = '…'
const mark5 = '…'
const id5 = '…'
const title5 = '…'
const note9 = '…'
const spawnMeta5 = '…'
const text13 = '…'
const text14 = '…'
const text15 = '…'
const outcome5 = '…'
const note10 = '…'
const filter5 = '…'
const mark6 = '…'
const id6 = '…'
const title6 = '…'
const note11 = '…'
const spawnMeta6 = '…'
const text16 = '…'
const text17 = '…'
const text18 = '…'
const outcome6 = '…'
const note12 = '…'
const filter6 = '…'
const name9 = '…'
const done8 = '…'
const tasks8 = '…'
const name10 = '…'
const done9 = '…'
const tasks9 = '…'
const name11 = '…'
const done10 = '…'
const tasks10 = '…'
const name12 = '…'
const length5 = '…'
const length6 = '…'
const about3 = '…'
const mark7 = '…'
const id7 = '…'
const title7 = '…'
const note13 = '…'
const spawnMeta7 = '…'
const text19 = '…'
const text20 = '…'
const text21 = '…'
const outcome7 = '…'
const note14 = '…'
const filter7 = '…'
const mark8 = '…'
const id8 = '…'
const title8 = '…'
const note15 = '…'
const spawnMeta8 = '…'
const text22 = '…'
const text23 = '…'
const text24 = '…'
const outcome8 = '…'
const note16 = '…'
const filter8 = '…'
const mark9 = '…'
const id9 = '…'
const title9 = '…'
const note17 = '…'
const spawnMeta9 = '…'
const text25 = '…'
const text26 = '…'
const text27 = '…'
const outcome9 = '…'
const note18 = '…'
const filter9 = '…'
const mark10 = '…'
const description = '…'
const spawnMeta10 = '…'
const mark11 = '…'
const description2 = '…'
const spawnMeta11 = '…'
const mark12 = '…'
const description3 = '…'
const spawnMeta12 = '…'
const length7 = '…'
const length8 = '…'
const glyph = '…'
const placeOf = '…'
const summary = '…'
const summary2 = '…'
const glyph2 = '…'
const summary3 = '…'
const summary4 = '…'
const glyph3 = '…'
const summary5 = '…'
const summary6 = '…'
return (
<Box flexDirection="column" paddingX={2}>
<Box justifyContent="space-between">
<Text bold wrap="truncate-end">
<Text color="cyan">
{" "}
</Text>
{`Run ${id}`}
</Text>
<Text dimColor>
{" "}
{done}
/
{tasks}
{` · ${tokensText}`}
</Text>
</Box>
<Text dimColor wrap="truncate-start">
{path}
</Text>
<Text dimColor>
────────
</Text>
<Box flexDirection="column" paddingLeft={0}>
<Box justifyContent="space-between">
<Text bold color="cyan" wrap="truncate-end">
{name}
{` ${mark}`}
<Text color="error">
{" "}
</Text>
</Text>
<Text dimColor>
{" "}
{done2}
/
{tasks2}
</Text>
</Box>
<Box justifyContent="space-between">
<Text bold color="cyan" wrap="truncate-end">
{name2}
{` ${mark}`}
<Text color="error">
{" "}
</Text>
</Text>
<Text dimColor>
{" "}
{done3}
/
{tasks3}
</Text>
</Box>
<Box justifyContent="space-between">
<Text bold color="cyan" wrap="truncate-end">
{name3}
{` ${mark}`}
<Text color="error">
{" "}
</Text>
</Text>
<Text dimColor>
{" "}
{done4}
/
{tasks4}
</Text>
</Box>
<Box justifyContent="space-between">
<Text bold wrap="truncate-end">
{name4}
</Text>
<Text dimColor>
{" "}
{length}
/
{length2}
</Text>
</Box>
<Box paddingLeft={2}>
<Text wrap="wrap" dimColor>
{about}
</Text>
</Box>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text wrap="truncate-end">
<Text color="cyan">
{" "}
{mark}
{" "}
</Text>
<Text bold>
{id}
</Text>
{" "}
{title}
<Text color="error">
{" "}
{note}
</Text>
</Text>
<Text dimColor>
{" "}
{spawnMeta}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={6}>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text2}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text3}
</Text>
<Text wrap="wrap">
{outcome}
</Text>
<Text wrap="wrap" dimColor>
{"gate: "}
{note2}
</Text>
<Text dimColor wrap="truncate-end">
{filter}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text wrap="truncate-end">
<Text color="cyan">
{" "}
{mark2}
{" "}
</Text>
<Text bold>
{id2}
</Text>
{" "}
{title2}
<Text color="error">
{" "}
{note3}
</Text>
</Text>
<Text dimColor>
{" "}
{spawnMeta2}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={6}>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text4}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text5}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text6}
</Text>
<Text wrap="wrap">
{outcome2}
</Text>
<Text wrap="wrap" dimColor>
{"gate: "}
{note4}
</Text>
<Text dimColor wrap="truncate-end">
{filter2}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text wrap="truncate-end">
<Text color="cyan">
{" "}
{mark3}
{" "}
</Text>
<Text bold>
{id3}
</Text>
{" "}
{title3}
<Text color="error">
{" "}
{note5}
</Text>
</Text>
<Text dimColor>
{" "}
{spawnMeta3}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={6}>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text7}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text8}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text9}
</Text>
<Text wrap="wrap">
{outcome3}
</Text>
<Text wrap="wrap" dimColor>
{"gate: "}
{note6}
</Text>
<Text dimColor wrap="truncate-end">
{filter3}
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="column" paddingLeft={0}>
<Box justifyContent="space-between">
<Text bold color="cyan" wrap="truncate-end">
{name5}
{` ${mark}`}
<Text color="error">
{" "}
</Text>
</Text>
<Text dimColor>
{" "}
{done5}
/
{tasks5}
</Text>
</Box>
<Box justifyContent="space-between">
<Text bold color="cyan" wrap="truncate-end">
{name6}
{` ${mark}`}
<Text color="error">
{" "}
</Text>
</Text>
<Text dimColor>
{" "}
{done6}
/
{tasks6}
</Text>
</Box>
<Box justifyContent="space-between">
<Text bold color="cyan" wrap="truncate-end">
{name7}
{` ${mark}`}
<Text color="error">
{" "}
</Text>
</Text>
<Text dimColor>
{" "}
{done7}
/
{tasks7}
</Text>
</Box>
<Box justifyContent="space-between">
<Text bold wrap="truncate-end">
{name8}
</Text>
<Text dimColor>
{" "}
{length3}
/
{length4}
</Text>
</Box>
<Box paddingLeft={2}>
<Text wrap="wrap" dimColor>
{about2}
</Text>
</Box>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text wrap="truncate-end">
<Text color="cyan">
{" "}
{mark4}
{" "}
</Text>
<Text bold>
{id4}
</Text>
{" "}
{title4}
<Text color="error">
{" "}
{note7}
</Text>
</Text>
<Text dimColor>
{" "}
{spawnMeta4}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={6}>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text10}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text11}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text12}
</Text>
<Text wrap="wrap">
{outcome4}
</Text>
<Text wrap="wrap" dimColor>
{"gate: "}
{note8}
</Text>
<Text dimColor wrap="truncate-end">
{filter4}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text wrap="truncate-end">
<Text color="cyan">
{" "}
{mark5}
{" "}
</Text>
<Text bold>
{id5}
</Text>
{" "}
{title5}
<Text color="error">
{" "}
{note9}
</Text>
</Text>
<Text dimColor>
{" "}
{spawnMeta5}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={6}>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text13}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text14}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text15}
</Text>
<Text wrap="wrap">
{outcome5}
</Text>
<Text wrap="wrap" dimColor>
{"gate: "}
{note10}
</Text>
<Text dimColor wrap="truncate-end">
{filter5}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text wrap="truncate-end">
<Text color="cyan">
{" "}
{mark6}
{" "}
</Text>
<Text bold>
{id6}
</Text>
{" "}
{title6}
<Text color="error">
{" "}
{note11}
</Text>
</Text>
<Text dimColor>
{" "}
{spawnMeta6}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={6}>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text16}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text17}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text18}
</Text>
<Text wrap="wrap">
{outcome6}
</Text>
<Text wrap="wrap" dimColor>
{"gate: "}
{note12}
</Text>
<Text dimColor wrap="truncate-end">
{filter6}
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="column" paddingLeft={0}>
<Box justifyContent="space-between">
<Text bold color="cyan" wrap="truncate-end">
{name9}
{` ${mark}`}
<Text color="error">
{" "}
</Text>
</Text>
<Text dimColor>
{" "}
{done8}
/
{tasks8}
</Text>
</Box>
<Box justifyContent="space-between">
<Text bold color="cyan" wrap="truncate-end">
{name10}
{` ${mark}`}
<Text color="error">
{" "}
</Text>
</Text>
<Text dimColor>
{" "}
{done9}
/
{tasks9}
</Text>
</Box>
<Box justifyContent="space-between">
<Text bold color="cyan" wrap="truncate-end">
{name11}
{` ${mark}`}
<Text color="error">
{" "}
</Text>
</Text>
<Text dimColor>
{" "}
{done10}
/
{tasks10}
</Text>
</Box>
<Box justifyContent="space-between">
<Text bold wrap="truncate-end">
{name12}
</Text>
<Text dimColor>
{" "}
{length5}
/
{length6}
</Text>
</Box>
<Box paddingLeft={2}>
<Text wrap="wrap" dimColor>
{about3}
</Text>
</Box>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text wrap="truncate-end">
<Text color="cyan">
{" "}
{mark7}
{" "}
</Text>
<Text bold>
{id7}
</Text>
{" "}
{title7}
<Text color="error">
{" "}
{note13}
</Text>
</Text>
<Text dimColor>
{" "}
{spawnMeta7}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={6}>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text19}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text20}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text21}
</Text>
<Text wrap="wrap">
{outcome7}
</Text>
<Text wrap="wrap" dimColor>
{"gate: "}
{note14}
</Text>
<Text dimColor wrap="truncate-end">
{filter7}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text wrap="truncate-end">
<Text color="cyan">
{" "}
{mark8}
{" "}
</Text>
<Text bold>
{id8}
</Text>
{" "}
{title8}
<Text color="error">
{" "}
{note15}
</Text>
</Text>
<Text dimColor>
{" "}
{spawnMeta8}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={6}>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text22}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text23}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text24}
</Text>
<Text wrap="wrap">
{outcome8}
</Text>
<Text wrap="wrap" dimColor>
{"gate: "}
{note16}
</Text>
<Text dimColor wrap="truncate-end">
{filter8}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text wrap="truncate-end">
<Text color="cyan">
{" "}
{mark9}
{" "}
</Text>
<Text bold>
{id9}
</Text>
{" "}
{title9}
<Text color="error">
{" "}
{note17}
</Text>
</Text>
<Text dimColor>
{" "}
{spawnMeta9}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={6}>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text25}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text26}
</Text>
<Text wrap="truncate-end">
<Text color="success">
{" "}
</Text>
{text27}
</Text>
<Text wrap="wrap">
{outcome9}
</Text>
<Text wrap="wrap" dimColor>
{"gate: "}
{note18}
</Text>
<Text dimColor wrap="truncate-end">
{filter9}
</Text>
</Box>
</Box>
</Box>
<Text dimColor>
other agents
</Text>
<Box justifyContent="space-between">
<Text wrap="truncate-end">
<Text color="cyan">
{" "}
{mark10}
{" "}
</Text>
{description}
</Text>
<Text dimColor>
{" "}
{spawnMeta10}
</Text>
</Box>
<Box justifyContent="space-between">
<Text wrap="truncate-end">
<Text color="cyan">
{" "}
{mark11}
{" "}
</Text>
{description2}
</Text>
<Text dimColor>
{" "}
{spawnMeta11}
</Text>
</Box>
<Box justifyContent="space-between">
<Text wrap="truncate-end">
<Text color="cyan">
{" "}
{mark12}
{" "}
</Text>
{description3}
</Text>
<Text dimColor>
{" "}
{spawnMeta12}
</Text>
</Box>
<Box marginTop={1}>
<Text bold>
<Text color="error">
{" "}
</Text>
{length7}
{" open"}
</Text>
<Text dimColor>
{" · "}
{length8}
{" fixed"}
</Text>
</Box>
<Box flexDirection="column">
<Box>
<Text color="success">
{" "}
{" "}
</Text>
<Text>
{glyph}
{" "}
</Text>
<Button plain label={`${placeOf}`} />
<Text wrap="truncate-end">
{" "}
{summary}
</Text>
</Box>
<Box paddingLeft={6}>
<Text wrap="wrap">
{summary2}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Text color="success">
{" "}
{" "}
</Text>
<Text>
{glyph2}
{" "}
</Text>
<Button plain label={`${placeOf}`} />
<Text wrap="truncate-end">
{" "}
{summary3}
</Text>
</Box>
<Box paddingLeft={6}>
<Text wrap="wrap">
{summary4}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Text color="success">
{" "}
{" "}
</Text>
<Text>
{glyph3}
{" "}
</Text>
<Button plain label={`${placeOf}`} />
<Text wrap="truncate-end">
{" "}
{summary5}
</Text>
</Box>
<Box paddingLeft={6}>
<Text wrap="wrap">
{summary6}
</Text>
</Box>
</Box>
<Text dimColor>
────────
</Text>
<Box columnGap={2}>
<Button plain dimColor hotkey="b" label="list" />
<Button plain dimColor hotkey="e" label="less" />
<Button plain dimColor hotkey="g" label="open" />
<Text dimColor>
1-9 to prompt
</Text>
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
await $.ui.toast(`Ledger: added to the prompt.`)
await $.ui.toast(`The ledger could not be loaded.`)
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.
hooks/register.tsx lines 1012–1171 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const { Box, Button, Text } = $.ui.resolve(e)
// What is drawn is narrower than the pane by the padding at each side.
const columns = Math.max(30, (e.props.bodyColumns ?? e.viewport?.columns ?? 60) - 2 * PAD)
const rule = '─'.repeat(columns)
const all = await read($, runs)
const openId = await read($, shown)
const now = all.find(one => one.id === openId)
const at = await $.clock.now()
const current = (await read($, run))?.id ?? 0
const isLive = (one: LedgerRun) =>
one.doneAt === undefined && one.spawns.some(spawn => spawn.endedAt === undefined)
// Reading the frame subscribes the drawing only while a subagent runs, so
// an idle pane stays still.
const mark = all.some(isLive) ? ([...SPINNER][(await read($, spin)) % SPINNER.length] ?? '') : ''
// The list: every run of the project, those not done first.
if (now === undefined) {
const withDone = await read($, isAll)
const rows = listed({ nextId: 0, current, runs: all }, withDone)
const doneCount = all.filter(one => one.doneAt !== undefined).length
const focused = await read($, cursor)
const here = rows.some(one => one.id === focused) ? focused : (rows[0]?.id ?? 0)
const picked = rows.find(one => one.id === here)
const asking = await read($, confirming)
return (
<Box flexDirection="column" paddingX={PAD}>
<Box justifyContent="space-between">
<Text bold>
<Text color="cyan">{ICON.tasks} </Text>Ledger
</Text>
<Text dimColor>
{all.length - doneCount} open · {doneCount} done
</Text>
</Box>
<Text dimColor>{rule}</Text>
{rows.length === 0 && (
<Text dimColor>{all.length === 0 ? 'Nothing planned yet.' : 'Every run is done.'}</Text>
)}
{rows.map((one, index) => {
const isOver = one.doneAt !== undefined
const failed = countsOf(one).failed
const tone = isOver ? 'success' : failed > 0 ? 'error' : 'cyan'
const glyph = isOver ? ICON.done : isLive(one) ? mark : failed > 0 ? ICON.failed : ICON.todo
return (
<Box justifyContent="space-between">
<Box>
<Text color="cyan">{one.id === here ? '▸' : ' '}</Text>
<Text color={tone} dimColor={isOver}>
{glyph}{' '}
</Text>
<Button
key={`run-${one.id}`}
plain
{...(index < 9 ? { hotkey: String(index + 1) } : {})}
{...(one.id === here ? { autoFocus: true as const } : {})}
dimColor={isOver}
label={cut(one.goal === '' ? `Run ${one.id}` : one.goal, Math.max(10, columns - 34))}
onPress={async () => {
await update($, confirming, () => 0)
await update($, shown, () => one.id)
}}
/>
{one.id === current ? <Text color="cyan"> ●</Text> : null}
</Box>
<Text dimColor>
{' '}
{runMarks(one)} · {ageOf(one.doneAt ?? one.startedAt, at)}
</Text>
</Box>
)
})}
<Text dimColor>{rule}</Text>
{asking !== 0 ? (
<Box columnGap={2}>
<Text color="warning">Clear run {asking} for good?</Text>
<Button
key="yes"
plain
hotkey="y"
label="yes"
onPress={async () => {
await changeBook($, book => cleared(book, asking))
await update($, confirming, () => 0)
}}
/>
<Button key="no" plain hotkey="n" label="no" onPress={() => update($, confirming, () => 0)} />
</Box>
) : picked === undefined ? (
<Button
key="all"
plain
dimColor
hotkey="a"
label={withDone ? 'open only' : 'all'}
onPress={() => update($, isAll, value => !value)}
/>
) : (
<Box columnGap={2}>
<Button
key="done"
plain
dimColor
hotkey="d"
label={picked.isClosed === true ? 'reopen' : 'done'}
onPress={async () => {
await changeBook($, (book, when) => closed(book, picked.id, picked.isClosed !== true, when))
}}
/>
<Button key="clear" plain dimColor hotkey="x" label="clear" onPress={() => update($, confirming, () => picked.id)} />
<Button
key="all"
plain
dimColor
hotkey="a"
label={withDone ? 'open only' : 'all'}
onPress={() => update($, isAll, value => !value)}
/>
</Box>
)}
</Box>
)
}
// One run. Each task is a line: marks and numbers say how it stands, and
// words are kept for what is wrong. Details add what each part is for,
// what was done, and what is finished or fixed.
const detailed = await read($, isDetailed)
const counts = countsOf(now)
const openFindings = now.findings.filter(one => one.status === 'open')
const fixedFindings = now.findings.filter(one => one.status === 'fixed')
const findings = [...openFindings, ...(detailed ? fixedFindings : [])]
const lanes = lanesOf(now)
// The finding "open" shows in lens: the one the focus is on, else the first.
const focusedFinding = await read($, pointed)
const target = findings.find(one => one.id === focusedFinding) ?? findings[0]
const loose = now.spawns.filter(one => one.task === undefined && (detailed || one.endedAt === undefined))
return (
<Box flexDirection="column" paddingX={PAD}>
<Box justifyContent="space-between">
<Text bold wrap="truncate-end">
<Text color="cyan">{ICON.tasks} </Text>
{now.goal === '' ? `Run ${now.id}` : now.goal}
</Text>
<Text dimColor>
{' '}
{counts.done}/{counts.tasks}
{counts.tokens > 0 ? ` · ${tokensText(counts.tokens)}` : ''}
</Text>
</Box>
{now.doc === undefined ? null : (
<Text dimColor wrap="truncate-start">
{now.doc.path}
</Text>
)}
<Text dimColor>{rule}</Text>
{unitsOf(now).map((unit, index, units) => (Licence text (MIT)
MIT License Copyright (c) 2026 Kuang Tar Lim 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.
What its code calls
writes filesdrives 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 9ced3c149462 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 read | Every module hooks/hooks.json names was read.hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.6 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No 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 open | Network 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 draws | The 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 line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.its repository's .claude-plugin/marketplace.json does not list it: no install line to give |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.starts no programs |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reaches no network |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An 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's .claude-plugin/marketplace.json does not list it, so there is no install line to give. Read it as code, or follow its author's README.
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 "buddylim-ledger" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claude…2h 10m · █████░░░✓ build ✓ build ✓ buildJavaKotlin3 Python■ ok 3 ■ ok 3 ■ ok 3 Razor proven 3 Razor proven 3 Razor proven 3Phases ──────── 3/3build Pythonbuild Pythonbuild Python… 3 more phasesLua ──────── 3/Kotlin■ the whole upgrade Ruby■ build build Ruby■ build build Ruby■ build build Ruby … 3 moreNext ──────── PythonRuby (by hand)Podsclick a button, or ctrl+x tab then Tab, EnterAttention ──────── 3! Scala ! Scala ! Scala … 3 moreSession ──────── okJava
-
Open a file first: /crit-tui file <path>Reopen this one in the crit browser view.Ask Claude…
-
Ask Claude…TodayOct 63 left · Mar overdueRemCTL: Sep✓ All done for today.● build3● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● build3● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● build3● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓Updated 14:32UndoRefresh
-
Ask Claude…TO graph› Fix login › Fix login › Fix loginScopeThis featureWhole projectHide done stepsReconnect
-
Ask Claude…Replay TheaterStep Prev1/3 write Next[31][31][31]Prev pNext nClose q────────● Prev● Prev● Prev
-
Ask Claude…great_cto: 3 gate waiting — /gatesGatesmy-app · 3 waiting · checked Gates UTCGates — Fix logina1b2c3dExpensive to undo. To approve, type Gates and press Enter.approve: Gates approveGates — Fix logina1b2c3dExpensive to undo. To approve, type Gates and press Enter.approve: Gates approveGates — Fix logina1b2c3dExpensive to undo. To approve, type Gates and press Enter.approve: Gates approve