modscode / Gallery / decision-log
decision-log
Architecture decision records you and Claude can go back to: ADR markdown files in the repo (docs/decisions/NNNN-slug.md), a `decision` tool for Claude, /decide to record your own, and /decisions to browse them (pane on terminal and deskto…
What it does
- Draws a pane
- Adds /decide, /decisions
- Watches tool calls and can refuse them
- Hooks prompt.compose, session.start
- 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 decision-log by mrjk05 (pane), as modscode read it from the mod's code:
// https://modscode.com/gallery/mrjk05-decision-log/
// 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: "Decisions" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const length = '…'
const id = '…'
const status = '…'
const title = '…'
const supersededNote = '…'
const title2 = '…'
const supersededNote2 = '…'
const title3 = '…'
const supersededNote3 = '…'
return (
<Box flexDirection="column">
<Text bold>
{length}
{" decision"}
</Text>
<Box flexDirection="row">
<Button plain label={`#${id}`} />
<Text>
{` ${status} `}
</Text>
<Text wrap="truncate-end">
{title}
{supersededNote}
</Text>
</Box>
<Box flexDirection="row">
<Button plain label={`#${id}`} />
<Text>
{` ${status} `}
</Text>
<Text wrap="truncate-end">
{title2}
{supersededNote2}
</Text>
</Box>
<Box flexDirection="row">
<Button plain label={`#${id}`} />
<Text>
{` ${status} `}
</Text>
<Text wrap="truncate-end">
{title3}
{supersededNote3}
</Text>
</Box>
</Box>
)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
mods/decision-log/hooks/register.tsx lines 461–471 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const { Box, Button, Text, Markdown } = $.ui.resolve(e)
const ui: Ui = { Box, Button, Text, Markdown }
const entries = await read($, records)
const view = memberOf(selected, e)
const choice = await read($, view)
const go = (id: number) => update($, view, () => id)
const entry = choice > 0 ? find(entries, choice) : undefined
if (entry !== undefined) return recordTree(ui, entry, go)
return listTree(ui, entries, e.props.bodyColumns, go)
})mods/decision-log/hooks/register.tsx lines 572–586 · Pane
function recordTree(ui: Ui, entry: DecisionEntry, go: (id: number) => unknown): RenderElement {
const { Box, Button, Markdown } = ui
const links = [...entry.supersedes, ...entry.supersededBy]
return (
<Box key={`record-${entry.id}`} flexDirection="column">
<Box flexDirection="row">
<Button key="back" label="← All decisions" onPress={() => go(-1)} />
{links.map(id => (
<Button key={`link-${id}`} label={`#${id}`} onPress={() => go(id)} />
))}
</Box>
<Markdown key={`md-${entry.id}`} text={recordMarkdown(entry)} />
</Box>
)
}mods/decision-log/hooks/register.tsx lines 531–548 · Pane
function listTree(ui: Ui, entries: readonly DecisionEntry[], columns: number | undefined, go: (id: number) => unknown): RenderElement {
const { Box, Text } = ui
if (entries.length === 0) {
return (
<Box key="decisions-empty" flexDirection="column">
<Text dimColor>{'No decisions recorded yet. Add one with /decide <title> — <why>, or ask Claude to record one.'}</Text>
</Box>
)
}
return (
<Box key="decisions-list" flexDirection="column">
<Text bold>
{entries.length} decision{entries.length === 1 ? '' : 's'}
</Text>
{newestFirst(entries).map(entry => row(ui, entry, columns, go))}
</Box>
)
}mods/decision-log/hooks/register.tsx lines 511–528 · Pane
function row(ui: Ui, entry: DecisionEntry, columns: number | undefined, go: (id: number) => unknown): RenderElement {
const { Box, Button, Text } = ui
const isDim = entry.status === 'superseded'
// Room for `#nnnn`, the status and spaces; a narrow phone gets a shorter line rather than a wrapped one.
const titleMax = columns === undefined ? 200 : Math.max(columns - 20, 10)
return (
<Box key={`row-${entry.id}`} flexDirection="row">
<Button key={`open-${entry.id}`} plain label={`#${entry.id}`} dimColor={isDim} onPress={() => go(entry.id)} />
<Text color={statusColor(entry.status)} dimColor={isDim}>
{` ${entry.status.padEnd(10)} `}
</Text>
<Text dimColor={isDim} wrap="truncate-end">
{clip(entry.title, titleMax)}
{supersededNote(entry)}
</Text>
</Box>
)
}Licence text (MIT)
MIT License Copyright (c) 2026 modemon contributors 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 filestool callsremembers
What its code shows
Read from the source at commit c14f77ca2a38 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.mods/decision-log/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).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 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 mrjk05/modemon/plugin install decision-log@modemonThis installs the marketplace's latest commit, which may not be the one read here (c14f77ca2a38). 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 "mrjk05-decision-log" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claude…#3#3 Fix loginEsc closes_No description._── alex · Oct 6Bash── alex · Oct 6Bash── alex · Oct 6Bashc copy URLEsc closes
-
Ask Claude…intentic savingsRun /intentic-pane to fill this.Refresh r
-
Ask Claude…HandoffHandoffHandoff… the rest of the step is in the handoff████████░░░░░░░░ /clear in 4spress 1 to clear now, or send a prompt to stay
-
Ask Claude…self-relayrelay packet: 3 chars (view truncated, full packet kept)c x
-
Ask Claude…packpack: 3 chars (view truncated, full pack kept)c x
-
Ask Claude…Question guideAwaiting answer Questions from Claude (3)Freeform answer1/3p ◀ Previousn Next ▶l Latesta AI explanation: ONh Hide historyCloseAI tokens this session: 3$1.24▍Your recent instructions▍Claude's preceding explanationCancelledFreeform answerExplainf Full context✦ AI explanation (instructions, context, effects, recommendation)compact context42%Generating… (you can keep answering)Freeform answerCould not generate an explanation: Freeform answerOFF (enable for the next question with [a])────────Past questions and answers31/3 ▶ Selected[Freeform answer] Question guide → Awaiting answer[Freeform answer] Question guide → Awaiting answer[Freeform answer] Question guide → Awaiting answer→ Freeform: Explain31/3 ▶ Selected[Freeform answer] Question guide → Awaiting answer[Freeform answer] Question guide → Awaiting answer[Freeform answer] Question guide → Awaiting answer→ Freeform: Explain31/3 ▶ Selected[Freeform answer] Question guide → Awaiting answer[Freeform answer] Question guide → Awaiting answer[Freeform answer] Question guide → Awaiting answer→ Freeform: Explain