workface
Keeps a long-running agent's working notes through every compaction: briefs the summarizer, re-attaches the notes after the summary, and shows them in a panel you can steer.
What it does
- Draws a pane, the status line
- Watches tool calls and can refuse them
- Hooks classic.SessionStart, prompt.submit, session.compact, session.measure and 2 more
- Keeps its own state between turns
- Starts processes
Good points
- No network calls
- 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 workface by Scott Hodge (pane, status), as modscode read it from the mod's code:
// https://modscode.com/gallery/scodge-24-workface/
// 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: "Workface" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button, Input } = $.ui.resolve(e)
const tranche = '…'
const lines = '…'
const fresh = '…'
const age = '…'
const commits = '…'
const heading = '…'
const length = '…'
const bullet = '…'
const text = '…'
const text2 = '…'
const text3 = '…'
const bullet2 = '…'
const text4 = '…'
const text5 = '…'
const text6 = '…'
const bullet3 = '…'
const text7 = '…'
const text8 = '…'
const text9 = '…'
const length2 = '…'
const bullet4 = '…'
const text10 = '…'
const text11 = '…'
const text12 = '…'
const bullet5 = '…'
const text13 = '…'
const text14 = '…'
const text15 = '…'
const bullet6 = '…'
const text16 = '…'
const text17 = '…'
const text18 = '…'
const length3 = '…'
const bullet7 = '…'
const text19 = '…'
const text20 = '…'
const text21 = '…'
const bullet8 = '…'
const text22 = '…'
const text23 = '…'
const text24 = '…'
const bullet9 = '…'
const text25 = '…'
const text26 = '…'
const text27 = '…'
return (
<Box flexDirection="column">
<Box flexDirection="column" marginBottom={1}>
<Box flexDirection="row" justifyContent="space-between">
<Text bold wrap="truncate-end">
{tranche}
</Text>
<Box flexShrink={0}>
<Button plain role="dismiss" label="✕" />
</Box>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0}>
<Box paddingX={1} backgroundColor="userMessageBackground">
<Button plain label="Compact" />
</Box>
<Box paddingX={1} backgroundColor="userMessageBackground">
<Button plain label="Full" />
</Box>
<Box paddingX={1} backgroundColor="userMessageBackground">
<Button plain label="Browse" />
</Box>
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
<Box flexShrink={0}>
<Text>
{`${lines}/120 lines`}
</Text>
</Box>
<Box flexShrink={0}>
<Text>
{`+${fresh} new`}
</Text>
</Box>
<Box flexShrink={0}>
<Text>
{`· ${age} old`}
</Text>
</Box>
<Box flexShrink={0}>
<Text>
{`· ${commits} commit since`}
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="row" justifyContent="space-between" backgroundColor="userMessageBackground">
<Box flexDirection="row" flexShrink={1}>
<Text>
▍
</Text>
<Button plain label={`▾ ${heading}`} />
<Text dimColor>
{" "}
{length}
</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} paddingRight={1}>
<Button plain label="✓" />
<Button plain dimColor label="↺" />
</Box>
</Box>
<Box flexDirection="row" justifyContent="space-between" paddingLeft={1}>
<Box flexDirection="row" flexShrink={1}>
<Text>
◆
</Text>
<Text>
{" "}
{bullet}
</Text>
<Text>
<Text>
{text}
</Text>
<Text>
{text2}
</Text>
<Text>
{text3}
</Text>
</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} marginLeft={1} paddingRight={1}>
<Button plain label="✓" />
<Button plain dimColor label="↺" />
</Box>
</Box>
<Box flexDirection="row" justifyContent="space-between" paddingLeft={1}>
<Box flexDirection="row" flexShrink={1}>
<Text>
◆
</Text>
<Text>
{" "}
{bullet2}
</Text>
<Text>
<Text>
{text4}
</Text>
<Text>
{text5}
</Text>
<Text>
{text6}
</Text>
</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} marginLeft={1} paddingRight={1}>
<Button plain label="✓" />
<Button plain dimColor label="↺" />
</Box>
</Box>
<Box flexDirection="row" justifyContent="space-between" paddingLeft={1}>
<Box flexDirection="row" flexShrink={1}>
<Text>
◆
</Text>
<Text>
{" "}
{bullet3}
</Text>
<Text>
<Text>
{text7}
</Text>
<Text>
{text8}
</Text>
<Text>
{text9}
</Text>
</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} marginLeft={1} paddingRight={1}>
<Button plain label="✓" />
<Button plain dimColor label="↺" />
</Box>
</Box>
<Box flexDirection="row" justifyContent="space-between" backgroundColor="userMessageBackground">
<Box flexDirection="row" flexShrink={1}>
<Text>
▍
</Text>
<Button plain label={`▾ ${heading}`} />
<Text dimColor>
{" "}
{length2}
</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} paddingRight={1}>
<Button plain label="✓" />
<Button plain dimColor label="↺" />
</Box>
</Box>
<Box flexDirection="row" justifyContent="space-between" paddingLeft={1}>
<Box flexDirection="row" flexShrink={1}>
<Text>
◆
</Text>
<Text>
{" "}
{bullet4}
</Text>
<Text>
<Text>
{text10}
</Text>
<Text>
{text11}
</Text>
<Text>
{text12}
</Text>
</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} marginLeft={1} paddingRight={1}>
<Button plain label="✓" />
<Button plain dimColor label="↺" />
</Box>
</Box>
<Box flexDirection="row" justifyContent="space-between" paddingLeft={1}>
<Box flexDirection="row" flexShrink={1}>
<Text>
◆
</Text>
<Text>
{" "}
{bullet5}
</Text>
<Text>
<Text>
{text13}
</Text>
<Text>
{text14}
</Text>
<Text>
{text15}
</Text>
</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} marginLeft={1} paddingRight={1}>
<Button plain label="✓" />
<Button plain dimColor label="↺" />
</Box>
</Box>
<Box flexDirection="row" justifyContent="space-between" paddingLeft={1}>
<Box flexDirection="row" flexShrink={1}>
<Text>
◆
</Text>
<Text>
{" "}
{bullet6}
</Text>
<Text>
<Text>
{text16}
</Text>
<Text>
{text17}
</Text>
<Text>
{text18}
</Text>
</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} marginLeft={1} paddingRight={1}>
<Button plain label="✓" />
<Button plain dimColor label="↺" />
</Box>
</Box>
<Box flexDirection="row" justifyContent="space-between" backgroundColor="userMessageBackground">
<Box flexDirection="row" flexShrink={1}>
<Text>
▍
</Text>
<Button plain label={`▾ ${heading}`} />
<Text dimColor>
{" "}
{length3}
</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} paddingRight={1}>
<Button plain label="✓" />
<Button plain dimColor label="↺" />
</Box>
</Box>
<Box flexDirection="row" justifyContent="space-between" paddingLeft={1}>
<Box flexDirection="row" flexShrink={1}>
<Text>
◆
</Text>
<Text>
{" "}
{bullet7}
</Text>
<Text>
<Text>
{text19}
</Text>
<Text>
{text20}
</Text>
<Text>
{text21}
</Text>
</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} marginLeft={1} paddingRight={1}>
<Button plain label="✓" />
<Button plain dimColor label="↺" />
</Box>
</Box>
<Box flexDirection="row" justifyContent="space-between" paddingLeft={1}>
<Box flexDirection="row" flexShrink={1}>
<Text>
◆
</Text>
<Text>
{" "}
{bullet8}
</Text>
<Text>
<Text>
{text22}
</Text>
<Text>
{text23}
</Text>
<Text>
{text24}
</Text>
</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} marginLeft={1} paddingRight={1}>
<Button plain label="✓" />
<Button plain dimColor label="↺" />
</Box>
</Box>
<Box flexDirection="row" justifyContent="space-between" paddingLeft={1}>
<Box flexDirection="row" flexShrink={1}>
<Text>
◆
</Text>
<Text>
{" "}
{bullet9}
</Text>
<Text>
<Text>
{text25}
</Text>
<Text>
{text26}
</Text>
<Text>
{text27}
</Text>
</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} marginLeft={1} paddingRight={1}>
<Button plain label="✓" />
<Button plain dimColor label="↺" />
</Box>
</Box>
<Box marginTop={1}>
<Input label="◆ note" placeholder="owner note or decision" submitLabel="add" />
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
<Box flexShrink={0}>
<Text>
{`${length} omitted`}
</Text>
</Box>
<Box flexShrink={0}>
<Text>
from the re-attach
</Text>
</Box>
<Box flexShrink={0}>
<Button plain dimColor label="· restore all" />
</Box>
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
const tranche = '…'
const lines = '…'
const over = '…'
const age = '…'
const stale = '…'
await $.ui.status(`${tranche} · ${lines}${over}/120L · ${age} old${stale}`)
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 616–775 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const elements = $.ui.resolve(e)
const { Box, Button, Markdown, Text } = elements
const Input = 'Input' in elements ? elements.Input : undefined
const wf = await attached($)
if (!wf) return <Text dimColor>No workface is attached to this session; `/workface start` or `attach`.</Text>
const shown = await read($, view)
const open = await read($, expanded)
const wrapped = await read($, openLines)
const pending = await read($, asked)
const commits = await read($, behind)
const skip = (await read($, omitted))[wf.path] ?? []
const owned = new Set(await storedList($, 'ownerNotes', wf.path))
const before = new Set(await storedList($, 'snapshot', wf.path))
// What a line gets beside its gutter, padding and its ask/omit icons; longer lines are cut and can be opened.
const room = e.props.bodyColumns - 11
const lines = wf.text.trimEnd().split('\n').length
const fresh = wf.text.split('\n').filter(line => isItem(line) && !before.has(line)).length
const { sections } = parse(wf.text)
const now = await $.clock.now()
const ageMs = now - wf.mtimeMs
// A second press takes the ask back, as a second omit press restores.
const ask = (key: string, heading: string, body: string) =>
void update($, asked, now =>
now?.key === key
? null
: { key, text: `The owner points at this part of the workface (${wf.path}, section "${heading.slice(3)}"):\n${body}` },
)
const askButton = (key: string, heading: string, body: string) => (
<Button
key={`a:${key}`}
plain
dimColor={pending?.key !== key}
label={pending?.key === key ? '✓' : '?'}
onPress={() => ask(key, heading, body)}
/>
)
// The selected tab sits on the band colour, as a section heading does; the others stay dim.
const tab = (name: 'workface' | 'preview' | 'tranches', label: string) => (
<Box key={`tb:${name}`} paddingX={1} backgroundColor={shown === name ? 'userMessageBackground' : undefined}>
<Button key={`t:${name}`} plain dimColor={shown !== name} label={label} onPress={() => void update($, view, () => name)} />
</Box>
)
// A piece of the stats row: never shrinks, so one that does not fit moves to the next line whole.
const stat = (key: string, color: string | undefined, text: string) => (
<Box key={`st:${key}`} flexShrink={0}>
<Text color={color} dimColor={color === undefined}>
{text}
</Text>
</Box>
)
// Three rows, so a narrow dock never splits a word: name and close, the tabs, then the stats.
const header = (
<Box key="header" flexDirection="column" marginBottom={1}>
<Box flexDirection="row" justifyContent="space-between">
<Text bold color={palette.accent} wrap="truncate-end">
{tranche(wf.path)}
</Text>
<Box flexShrink={0}>
<Button key="close" plain role="dismiss" label="✕" onPress={() => void closePanel($)} />
</Box>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0}>
{tab('workface', 'Compact')}
{tab('preview', 'Full')}
{tab('tranches', 'Browse')}
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
{stat('lines', budgetColor(lines, palette), `${lines}/${BUDGET_LINES} lines`)}
{fresh > 0 && stat('fresh', palette.good, `+${fresh} new`)}
{stat('age', ageColor(ageMs, palette), `· ${age(ageMs)} old`)}
{commits > 0 && stat('commits', palette.sha, `· ${commits} commit${commits === 1 ? '' : 's'} since`)}
</Box>
</Box>
)
if (shown === 'preview') {
const preview = [
'**Added to every compaction’s summarizer instructions**',
'',
summarizerBrief(wf.path, '(the workface text shown below)'),
'',
'**Inserted after the compaction summary**',
'',
workfaceMessage(wf, skip, [...owned], 'right after this compaction summary'),
].join('\n')
return (
<Box flexDirection="column">
{header}
<Markdown key="preview" text={preview.slice(0, 10_000)} />
</Box>
)
}
if (shown === 'tranches') {
const rows = await tranches($)
return (
<Box flexDirection="column">
{header}
{rows.map(row => (
<Box key={`tr:${row.name}`} flexDirection="row" gap={1}>
<Text color={row.path === wf.path ? 'claude' : undefined} bold={row.path === wf.path}>
{row.path === wf.path ? '▸' : ' '} {row.name}
</Text>
<Text color={budgetColor(row.lines, palette)}>{row.lines}L</Text>
<Text color={ageColor(now - row.mtimeMs, palette)}>{age(now - row.mtimeMs)}</Text>
{row.running.length > 0 && <Text color={palette.good}>● {row.running.join(', ')}</Text>}
{row.idle > 0 && (
<Text dimColor>
○ {row.idle} not running
</Text>
)}
</Box>
))}
</Box>
)
}
const rows = sections.flatMap((section, index) => {
const isOpen = open.includes(section.heading)
const isOmitted = skip.includes(section.heading)
const items = section.lines.filter(isItem)
const head = (
<Box
key={`s:${section.heading}`}
flexDirection="row"
justifyContent="space-between"
backgroundColor="userMessageBackground"
>
<Box flexDirection="row" flexShrink={1}>
<Text color={isOmitted ? undefined : sectionColor(section.heading, index)} dimColor={isOmitted}>
▍
</Text>
<Button
key={`x:${section.heading}`}
plain
label={`${isOpen ? '▾' : '▸'} ${section.heading.slice(3)}`}
dimColor={isOmitted}
onPress={() =>
void update($, expanded, now =>
now.includes(section.heading) ? now.filter(heading => heading !== section.heading) : [...now, section.heading],
)
}
/>
<Text dimColor> {items.length}</Text>
</Box>
<Box flexDirection="row" gap={1} flexShrink={0} paddingRight={1}>
{askButton(section.heading, section.heading, [section.heading, ...items].join('\n'))}
<Button
key={`o:${section.heading}`}
plain
dimColor
label={isOmitted ? '↺' : '✕'}
onPress={() => void toggleOmitted($, wf.path, section.heading)}
/>
</Box>
</Box>Licence text (MIT)
MIT License Copyright (c) 2026 Scott Hodge 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
runs programswrites filesenv varstool 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 92ca065a790c 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.2 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.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).hooks/register.tsx:209 date (not on Windows); hooks/register.tsx:260 rm (not on Windows); hooks/register.tsx:306 rm (not on Windows) |
| 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.date, rm, git (reaches the network) |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reads environment variables and files and reaches the 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 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 scodge-24/workface/plugin install workface@workfaceThis installs the marketplace's latest commit, which may not be the one read here (92ca065a790c). 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 "scodge-24-workface" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claude…────────Clear doneClaude⋯└─ buildCancelCancelCancel└─ buildCancelCancelCancel└─ buildCancelCancelCancel
-
Ask Claude…GitHub inboxGitHubloading…Refresh rbuildbuildbuildClose xStealth IssuesNo open issues in this view.#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopen#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopen#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopenPull requestsNo open pull requests.#3 Fix login · main · draft · build · HiddenChecksReviewopen#3 Fix login · main · draft · build · HiddenChecksReviewopen#3 Fix login · main · draft · build · HiddenChecksReviewopenChecks for #3Plain
-
a1b2c3d's result did not fit in the promptAsk Claude…
-
Ask Claude…AskSide questions. Answers stay here, out of the chat.Nothing asked yet.────────Remove ask────────› Copythinking…No answer.(empty)Use promptUse promptUse promptCopyRetryRemove────────› Copythinking…No answer.(empty)Use promptUse promptUse promptCopyRetryRemove────────› Copythinking…No answer.(empty)Use promptUse promptUse promptCopyRetryRemoveSuggest next promptsClear answered
-
Ask Claude…ask attached to your next messageaskask #a1b2c3d› No answer: thinking…› No answer: thinking…› No answer: thinking…/ask a1b2c3d <follow-up> to continueFollow up on #a1b2c3d…← All threads ✓ attached to your next message
-
Ask Claude…⏳ 3 test steps waiting on youtestsacme/app · main● Fix login⎿ before: EditNeeds you⋯● Writeanswer in the dialog below▾ Bash42%✓ Clean upNote✓ Clean upNote✓ Clean upNoteor type an answer… Writeextra details (optional)…lessreply…dismiss▾ Bash42%✓ Clean upNote✓ Clean upNote✓ Clean upNoteor type an answer… Writeextra details (optional)…lessreply…dismiss▾ Bash42%✓ Clean upNote✓ Clean upNote✓ Clean upNoteor type an answer… Writeextra details (optional)…lessreply…dismissSend 3 answers