modscode JA

modscode / Gallery / jev-conventions

jev-conventions

Instant repo-convention checks on every edit: CLAUDE.md, AGENTS.md, style guides and config facts compiled into atomic rules, each edit judged against all of them by Jev in a few hundred ms.

Code you can checkTerminal + desktopPaneToastBoxButtonText

What it does

  • Draws a pane, toasts
  • Adds /conventions
  • Watches tool calls and can refuse them
  • Hooks session.end, session.start, turn.complete, turn.start
  • Keeps its own state between turns

Good points

  • 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)

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

// Drawn like jev-conventions by mako-code (pane, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/mako-code-jev-conventions/
// 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: "Conventions" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const mode = '…'
    const plural = '…'
    const fmtP = '…'
    const fmtP2 = '…'
    const phase = '…'
    const note = '…'
    const ledgerLine = '…'
    const hhmm = '…'
    const file = '…'
    const severity = '…'
    const rule = '…'
    const fmtP3 = '…'
    const hhmm2 = '…'
    const file2 = '…'
    const severity2 = '…'
    const rule2 = '…'
    const fmtP4 = '…'
    const hhmm3 = '…'
    const file3 = '…'
    const severity3 = '…'
    const rule3 = '…'
    const fmtP5 = '…'
    const severity4 = '…'
    const checks = '…'
    const flags = '…'
    const fmtP6 = '…'
    const fmtP7 = '…'
    const rule4 = '…'
    const appliesTo = '…'
    const source = '…'
    const id = '…'
    const severity5 = '…'
    const checks2 = '…'
    const flags2 = '…'
    const fmtP8 = '…'
    const fmtP9 = '…'
    const rule5 = '…'
    const appliesTo2 = '…'
    const source2 = '…'
    const id2 = '…'
    const severity6 = '…'
    const checks3 = '…'
    const flags3 = '…'
    const fmtP10 = '…'
    const fmtP11 = '…'
    const rule6 = '…'
    const appliesTo3 = '…'
    const source3 = '…'
    const id3 = '…'
    const length = '…'
    const rule7 = '…'
    const appliesTo4 = '…'
    const why = '…'
    const rule8 = '…'
    const appliesTo5 = '…'
    const rule9 = '…'
    const appliesTo6 = '…'
    return (
      <Box flexDirection="column">
        <Text bold>
          Jev conventions
          {" "}
          <Text dimColor>
            {"· "}
            {mode}
            {" · "}
            {plural}
            {" · threshold "}
            {fmtP}
            {" (must "}
            {fmtP2}
            )
          </Text>
        </Text>
        <Text dimColor wrap="wrap">
          {phase}
        </Text>
        <Text dimColor wrap="wrap">
          {note}
        </Text>
        <Text dimColor>
          {ledgerLine}
        </Text>
        <Text>
          {" "}
        </Text>
        <Text bold>
          Violations
        </Text>
        <Text dimColor>
          None yet.
        </Text>
        <Box gap={1}>
          <Box flexShrink={1} flexGrow={1}>
            <Text color="red" wrap="wrap">
              {hhmm}
              {" "}
              {file}
              {" ["}
              {severity}
              {"] "}
              {rule}
              {" p="}
              {fmtP3}
              {" · refused"}
            </Text>
          </Box>
          <Button label="False positive" />
        </Box>
        <Box gap={1}>
          <Box flexShrink={1} flexGrow={1}>
            <Text color="red" wrap="wrap">
              {hhmm2}
              {" "}
              {file2}
              {" ["}
              {severity2}
              {"] "}
              {rule2}
              {" p="}
              {fmtP4}
              {" · refused"}
            </Text>
          </Box>
          <Button label="False positive" />
        </Box>
        <Box gap={1}>
          <Box flexShrink={1} flexGrow={1}>
            <Text color="red" wrap="wrap">
              {hhmm3}
              {" "}
              {file3}
              {" ["}
              {severity3}
              {"] "}
              {rule3}
              {" p="}
              {fmtP5}
              {" · refused"}
            </Text>
          </Box>
          <Button label="False positive" />
        </Box>
        <Text>
          {" "}
        </Text>
        <Text bold>
          Rules
        </Text>
        <Text dimColor>
          {"No conventions found. Add a CLAUDE.md or AGENTS.md, run /conventions add \"<rule>\", or press Learn."}
        </Text>
        <Text dimColor>
          sev     checks flags avg p   thr  rule · applies to · source [id]
        </Text>
        <Text wrap="wrap">
          {severity4}
          {checks}
          {flags}
          {fmtP6}
          {fmtP7}
          {" "}
          {rule4}
          {" · "}
          {appliesTo}
          {" · "}
          {source}
          {" ["}
          {id}
          ]
        </Text>
        <Text wrap="wrap">
          {severity5}
          {checks2}
          {flags2}
          {fmtP8}
          {fmtP9}
          {" "}
          {rule5}
          {" · "}
          {appliesTo2}
          {" · "}
          {source2}
          {" ["}
          {id2}
          ]
        </Text>
        <Text wrap="wrap">
          {severity6}
          {checks3}
          {flags3}
          {fmtP10}
          {fmtP11}
          {" "}
          {rule6}
          {" · "}
          {appliesTo3}
          {" · "}
          {source3}
          {" ["}
          {id3}
          ]
        </Text>
        <Text dimColor>
          +
          {length}
          {" more"}
        </Text>
        <Text>
          {" "}
        </Text>
        <Text bold>
          Proposed by /conventions learn
        </Text>
        <Box gap={1}>
          <Box flexShrink={1} flexGrow={1}>
            <Text wrap="wrap">
              {rule7}
              {" "}
              <Text dimColor>
                (
                {appliesTo4}
                {` · ${why}`}
                )
              </Text>
            </Text>
          </Box>
          <Button label="Accept" />
          <Button label="Reject" />
        </Box>
        <Box gap={1}>
          <Box flexShrink={1} flexGrow={1}>
            <Text wrap="wrap">
              {rule8}
              {" "}
              <Text dimColor>
                (
                {appliesTo5}
                {` · ${why}`}
                )
              </Text>
            </Text>
          </Box>
          <Button label="Accept" />
          <Button label="Reject" />
        </Box>
        <Box gap={1}>
          <Box flexShrink={1} flexGrow={1}>
            <Text wrap="wrap">
              {rule9}
              {" "}
              <Text dimColor>
                (
                {appliesTo6}
                {` · ${why}`}
                )
              </Text>
            </Text>
          </Box>
          <Button label="Accept" />
          <Button label="Reject" />
        </Box>
        <Text>
          {" "}
        </Text>
        <Box gap={1}>
          <Button hotkey="r" label="Recompile" />
          <Button hotkey="l" label="Learn" />
          <Button hotkey="x" role="dismiss" label="Close" />
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const error = '…'
    const plural = '…'
    await $.ui.toast(`Off: ${error}`)
    await $.ui.toast(`${plural} from ${plural}. /conventions to review`)
    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.

mods/jev/jev-conventions/hooks/register.tsx lines 682–793 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const st = await read($, status)
    if (!st.hasKey) {
      return (
        <Box flexDirection="column">
          <Text bold>Jev conventions</Text>
          <Text wrap="wrap">{NO_KEY_TEXT}</Text>
          <Box marginTop={1}>
            <Button key="close" hotkey="x" role="dismiss" label="Close" onPress={() => void $.ui.close({ id: PANE })} />
          </Box>
        </Box>
      )
    }
    const all = await read($, rules)
    const s = await read($, stats)
    const list = await read($, findings)
    const props = await read($, proposals)
    const l = await read($, ledger)
    const raised = await read($, bumps)
    const shown = list.slice(-8).reverse()
    const ordered = [...all].sort((a, b) => (s[b.id]?.flags ?? 0) - (s[a.id]?.flags ?? 0) || (s[b.id]?.checks ?? 0) - (s[a.id]?.checks ?? 0))
    const paneRows = e.props.scroll.bodyRows > 0 ? e.props.scroll.bodyRows : (e.viewport?.rows ?? 40)
    const ruleRows = Math.max(5, paneRows - 16 - shown.length - props.length)
    const phase =
      st.phase === 'compiling'
        ? 'Compiling conventions…'
        : st.phase === 'learning'
          ? 'Learning from sample files…'
          : `Sources: ${st.sources.join(', ') || 'none found'}${st.compiledAt !== null ? ` · compiled ${hhmm(st.compiledAt)}` : ''}`

    return (
      <Box flexDirection="column">
        <Text bold>
          Jev conventions{' '}
          <Text dimColor>
            · {mode()} · {plural(all.length, 'rule')} · threshold {fmtP(baseThreshold())} (must {fmtP(mustThreshold())})
          </Text>
        </Text>
        <Text dimColor wrap="wrap">
          {phase}
        </Text>
        {st.note !== null && (
          <Text dimColor wrap="wrap">
            {st.note}
          </Text>
        )}
        <Text dimColor>{ledgerLine(l)}</Text>
        <Text> </Text>
        <Text bold>Violations</Text>
        {shown.length === 0 && <Text dimColor>None yet.</Text>}
        {shown.map(f => (
          <Box key={`v-${f.id}`} gap={1}>
            <Box flexShrink={1} flexGrow={1}>
              <Text
                color={f.isFalsePositive ? undefined : f.action === 'denied' ? 'red' : 'yellow'}
                dimColor={f.isFalsePositive}
                strikethrough={f.isFalsePositive}
                wrap="wrap"
              >
                {hhmm(f.at)} {f.file} [{f.severity}] {clip(f.rule.replace(/\s+/g, ' '), 200)} p={fmtP(f.p)}
                {f.action === 'denied' ? ' · refused' : f.action === 'warned' ? ' · warned' : ''}
              </Text>
            </Box>
            {!f.isFalsePositive && <Button key={`fp:${f.id}`} label="False positive" onPress={() => void markFalsePositive($, f.id)} />}
          </Box>
        ))}
        <Text> </Text>
        <Text bold>Rules</Text>
        {all.length === 0 && st.phase === 'idle' && (
          <Text dimColor>{'No conventions found. Add a CLAUDE.md or AGENTS.md, run /conventions add "<rule>", or press Learn.'}</Text>
        )}
        <Text dimColor>{'sev     checks flags avg p   thr  rule · applies to · source [id]'}</Text>
        {ordered.slice(0, ruleRows).map(r => {
          const q = s[r.id]
          return (
            <Text key={`r-${r.id}`} dimColor={!q} wrap="wrap">
              {r.severity.padEnd(6)}
              {String(q?.checks ?? 0).padStart(7)}
              {String(q?.flags ?? 0).padStart(6)}
              {fmtP(avgP(q)).padStart(6)}
              {fmtP(thresholdFor(r, raised)).padStart(6)} {r.rule} · {r.appliesTo} · {r.source} [{r.id}]
            </Text>
          )
        })}
        {ordered.length > ruleRows && <Text dimColor>+{ordered.length - ruleRows} more</Text>}
        {props.length > 0 && <Text> </Text>}
        {props.length > 0 && <Text bold>Proposed by /conventions learn</Text>}
        {props.map(p => (
          <Box key={`p-${p.id}`} gap={1}>
            <Box flexShrink={1} flexGrow={1}>
              <Text wrap="wrap">
                {p.rule}{' '}
                <Text dimColor>
                  ({p.appliesTo}
                  {p.why !== '' ? ` · ${p.why}` : ''})
                </Text>
              </Text>
            </Box>
            <Button key={`accept:${p.id}`} label="Accept" onPress={() => void acceptProposal($, p.id)} />
            <Button key={`reject:${p.id}`} label="Reject" onPress={() => void rejectProposal($, p.id)} />
          </Box>
        ))}
        <Text> </Text>
        <Box gap={1}>
          <Button key="recompile" hotkey="r" label="Recompile" onPress={() => void compile($, 'pane', true)} />
          <Button key="learn" hotkey="l" label="Learn" onPress={() => void learn($)} />
          <Button key="close" hotkey="x" role="dismiss" label="Close" onPress={() => void $.ui.close({ id: PANE })} />
        </Box>
      </Box>
    )
  })
Licence text (MIT)
MIT License

Copyright (c) 2026 mako-code

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

networkruns programswrites 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 ec6ea2383749 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.mods/jev/jev-conventions/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.4 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.mods/jev/jev-conventions/hooks/register.tsx:135 fetch(JEV_URL)
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.git (reaches the network)
Reads and sendsWhether it both reads files or environment variables and reaches the network.reads environment variables and files and reaches the 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 mako-code/gobworks
/plugin install jev-conventions@gobworks

This installs the marketplace's latest commit, which may not be the one read here (ec6ea2383749). 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 "mako-code-jev-conventions" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs