ziel-graph
Der Plan eines Repos in zwei Ansichten, mit GOAL.md als Anker: /graph zeigt schmal die laufenden Chats und den Plan als Graph, /orchestrator breit denselben Plan als Prozesskarten
何をするか
- 欄・トーストを描く
- /graph・/orchestrator を足す
- prompt.submit・session.receive・session.start・turn.completeにフックする
- プロセスを起こす
良いところ
- ネットワークに出ない
- TypeScript で書かれている
- デスクトップ専用の分岐がある
- エラーを扱う
作り始めるためのコード
2 種類あります。上のデザインから modscode が書いた雛形と、その Mod 自身のコードのうち描いている部分です。
雛形(register.tsx)
import type { Register } from 'claude-code'
// Drawn like ziel-graph by Tzy197 (pane, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/tzy197-ziel-graph/
// 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: "Ziel-Graph" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button, Select } = $.ui.resolve(e)
const endzielZeile = '…'
const zaehler = '…'
const faktenZeile = '…'
const neue = '…'
const fertigZeile = '…'
const fertigZeile2 = '…'
const fertigZeile3 = '…'
const status = '…'
const farben = '…'
const label = '…'
const festZeile = '…'
const kopf = '…'
const one = '…'
const length = '…'
const kopf2 = '…'
const titel = '…'
const text = '…'
const nameVon = '…'
const alter = '…'
const naechster = '…'
const frage = '…'
const kopf3 = '…'
const titel2 = '…'
const satz = '…'
return (
<Box flexDirection="column" gap={1}>
<Box flexDirection="column">
<Box flexDirection="row" flexWrap="wrap" columnGap={1} alignItems="center">
<Text bold wrap="wrap">
{endzielZeile}
</Text>
<Button label="Endziel festlegen" />
</Box>
<Text dimColor wrap="wrap">
{zaehler}
</Text>
<Text dimColor wrap="wrap">
{faktenZeile}
</Text>
<Text wrap="wrap">
{neue}
</Text>
</Box>
<Box flexDirection="column">
<Text bold wrap="wrap">
GOAL.md ist noch leer
</Text>
<Text wrap="wrap">
GOAL.md in der Wurzel des Repos ist der Anker des Plans: Sie nennt das Endziel, die Zwischenziele und je Strang sein Zi…
</Text>
<Box>
<Button label="GOAL.md mit dem Chat entwerfen" variant="primary" />
</Box>
</Box>
<Box flexDirection="column">
<Box flexDirection="row" flexWrap="wrap" columnGap={1} alignItems="center">
<Text wrap="wrap">
{fertigZeile}
</Text>
<Button label="Zum Dauerläufer machen" />
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} alignItems="center">
<Text wrap="wrap">
{fertigZeile2}
</Text>
<Button label="Zum Dauerläufer machen" />
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} alignItems="center">
<Text wrap="wrap">
{fertigZeile3}
</Text>
<Button label="Zum Dauerläufer machen" />
</Box>
</Box>
<Box flexDirection="column">
<Text bold wrap="wrap">
{status}
</Text>
<Text dimColor wrap="wrap">
Ein Modell-Aufruf mit claude-sonnet-5-5 liest GOAL.md, Doku, Chats und Commits des Repos. Die Leiste zeigt den Plan, so…
</Text>
<Text dimColor wrap="wrap">
Darunter steht weiter der vorige Plan.
</Text>
<Text wrap="wrap">
Noch kein Plan für dieses Repo. „Neu ableiten“ liest GOAL.md, README.md, CLAUDE.md und die Doku unter docs/, die laufen…
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
<Button label="Neu ableiten" variant="primary" />
<Button label="Neu laden" />
<Select label="Farben" value={`${farben}`} />
<Button label={`Farben: ${label}`} />
</Box>
</Box>
<Box flexDirection="column">
<Text bold wrap="wrap">
{festZeile}
</Text>
<Text dimColor wrap="wrap">
Eine Festlegung ist ein Satz von dir, der bei jedem Ableiten gewinnt: wohin etwas gehört, was zuerst kommt, was zusamme…
</Text>
<Text wrap="wrap">
Die Festlegungen sind andere als beim letzten Ableiten: „Neu ableiten“ wendet sie an.
</Text>
<Text dimColor wrap="wrap">
Diese Oberfläche zeichnet kein Eingabefeld: Eine neue Festlegung gibst du am Rechner ein.
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
<Button label="Festlegen" />
<Button label="In GOAL.md eintragen lassen" />
</Box>
</Box>
<Box flexDirection="column">
<Text wrap="wrap">
{kopf}
</Text>
<Text wrap="wrap">
{`– ${one}`}
</Text>
<Text wrap="wrap">
{`– ${one}`}
</Text>
<Text wrap="wrap">
{`– ${one}`}
</Text>
<Text dimColor wrap="wrap">
{`… und ${length} weitere in der Datei des Plans.`}
</Text>
</Box>
<Box flexDirection="row" alignItems="flex-start" columnGap={2}>
<Box flexDirection="column" gap={1}>
<Box flexDirection="column">
<Text dimColor wrap="wrap">
{kopf2}
</Text>
<Text bold wrap="wrap">
{titel}
</Text>
<Text wrap="wrap">
{`– ${text}`}
</Text>
<Text wrap="wrap">
{`– ${text}`}
</Text>
<Text wrap="wrap">
{`– ${text}`}
</Text>
</Box>
<Box flexDirection="column">
<Text bold wrap="wrap">
{`○ Chat: ${nameVon} (dieser Chat)`}
</Text>
<Text dimColor wrap="wrap">
{`${alter}`}
</Text>
<Text wrap="wrap">
Stand: noch keiner
</Text>
<Text wrap="wrap">
{`Weiter: ${naechster}`}
</Text>
<Text bold wrap="wrap">
{`Wartet auf dich: ${frage}`}
</Text>
</Box>
<Box flexDirection="column">
<Text bold wrap="wrap">
{`○ Chat: ${nameVon} (dieser Chat)`}
</Text>
<Text dimColor wrap="wrap">
{`${alter}`}
</Text>
<Text wrap="wrap">
Stand: noch keiner
</Text>
<Text wrap="wrap">
{`Weiter: ${naechster}`}
</Text>
<Text bold wrap="wrap">
{`Wartet auf dich: ${frage}`}
</Text>
</Box>
<Box flexDirection="column">
<Text bold wrap="wrap">
{`○ Chat: ${nameVon} (dieser Chat)`}
</Text>
<Text dimColor wrap="wrap">
{`${alter}`}
</Text>
<Text wrap="wrap">
Stand: noch keiner
</Text>
<Text wrap="wrap">
{`Weiter: ${naechster}`}
</Text>
<Text bold wrap="wrap">
{`Wartet auf dich: ${frage}`}
</Text>
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
<Button label="Auftrag ins Eingabefeld legen" variant="primary" />
<Button label="Erklären lassen" />
<Button label="Endziel festlegen" />
</Box>
<Box flexDirection="column">
<Text dimColor wrap="wrap">
Seine Bündel haben gerade keine eigene Karte. Arbeitet ein Chat an einem davon, stehen sie nach dem nächsten Ableiten w…
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
<Button label={`Auftrag: ${titel}`} />
<Button label={`Auftrag: ${titel}`} />
<Button label={`Auftrag: ${titel}`} />
</Box>
</Box>
<Box flexDirection="column" />
</Box>
</Box>
<Box flexDirection="column">
<Text bold wrap="wrap">
Laufende Chats
</Text>
<Button plain label={`▸ ○ ${nameVon} (dieser Chat)`} />
<Button plain label={`▸ ○ ${nameVon} (dieser Chat)`} />
<Button plain label={`▸ ○ ${nameVon} (dieser Chat)`} />
</Box>
<Box flexDirection="column" gap={1}>
<Box flexDirection="column">
<Text dimColor wrap="wrap">
{kopf3}
</Text>
<Text bold wrap="wrap">
{titel2}
</Text>
<Text wrap="wrap">
{`– ${text}`}
</Text>
<Text wrap="wrap">
{`– ${text}`}
</Text>
<Text wrap="wrap">
{`– ${text}`}
</Text>
</Box>
<Box flexDirection="column">
<Text bold wrap="wrap">
{`○ Chat: ${nameVon} (dieser Chat)`}
</Text>
<Text dimColor wrap="wrap">
{`${alter}`}
</Text>
<Text wrap="wrap">
Stand: noch keiner
</Text>
<Text wrap="wrap">
{`Weiter: ${naechster}`}
</Text>
<Text bold wrap="wrap">
{`Wartet auf dich: ${frage}`}
</Text>
</Box>
<Box flexDirection="column">
<Text bold wrap="wrap">
{`○ Chat: ${nameVon} (dieser Chat)`}
</Text>
<Text dimColor wrap="wrap">
{`${alter}`}
</Text>
<Text wrap="wrap">
Stand: noch keiner
</Text>
<Text wrap="wrap">
{`Weiter: ${naechster}`}
</Text>
<Text bold wrap="wrap">
{`Wartet auf dich: ${frage}`}
</Text>
</Box>
<Box flexDirection="column">
<Text bold wrap="wrap">
{`○ Chat: ${nameVon} (dieser Chat)`}
</Text>
<Text dimColor wrap="wrap">
{`${alter}`}
</Text>
<Text wrap="wrap">
Stand: noch keiner
</Text>
<Text wrap="wrap">
{`Weiter: ${naechster}`}
</Text>
<Text bold wrap="wrap">
{`Wartet auf dich: ${frage}`}
</Text>
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
<Button label="Auftrag ins Eingabefeld legen" variant="primary" />
<Button label="Erklären lassen" />
<Button label="Endziel festlegen" />
</Box>
<Box flexDirection="column">
<Text dimColor wrap="wrap">
Seine Bündel haben gerade keine eigene Karte. Arbeitet ein Chat an einem davon, stehen sie nach dem nächsten Ableiten w…
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
<Button label={`Auftrag: ${titel}`} />
<Button label={`Auftrag: ${titel}`} />
<Button label={`Auftrag: ${titel}`} />
</Box>
</Box>
<Box flexDirection="column" />
</Box>
<Box flexDirection="column">
<Text bold wrap="wrap">
{`Festlegungen (${length})`}
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} alignItems="center">
<Text wrap="wrap">
{`– ${satz} (noch nicht in GOAL.md)`}
</Text>
<Button label="Entfernen" />
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} alignItems="center">
<Text wrap="wrap">
{`– ${satz} (noch nicht in GOAL.md)`}
</Text>
<Button label="Entfernen" />
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} alignItems="center">
<Text wrap="wrap">
{`– ${satz} (noch nicht in GOAL.md)`}
</Text>
<Button label="Entfernen" />
</Box>
</Box>
<Box flexDirection="column">
<Text bold wrap="wrap">
{`Beim Ableiten aufgefallen (${length})`}
</Text>
<Text dimColor wrap="wrap">
{`– ${one}`}
</Text>
<Text dimColor wrap="wrap">
{`– ${one}`}
</Text>
<Text dimColor wrap="wrap">
{`– ${one}`}
</Text>
<Text dimColor wrap="wrap">
{`… und ${length} weitere in der Datei des Plans.`}
</Text>
</Box>
<Text dimColor wrap="wrap">
Diesen Plan hat ein Modell aus GOAL.md, Doku, Chats und Git-Verlauf abgeleitet. Festgelegt ist nur, was in GOAL.md steh…
</Text>
</Box>
)
})
on('session.start', async ($, e, next) => {
const nameVon = '…'
await $.ui.toast(`Die Antwort ist leer.`)
await $.ui.toast(`Antwort an „${nameVon}“ zugestellt.`)
return next(e)
})
}
Mod 自身のコード
Mod のライセンス(MIT)に従って載せています。全文は下にあります。写すときは著作権表示を残してください。
plugins/ziel-graph/hooks/register.tsx 571〜598 行 · ペイン
on('ui.render', { component: 'Pane', requestId: KARTEN }, async ($, e) => {
const lage: KartenLage = {
stand: await liesGeladen($),
laufend: await read($, chats),
jetzt: await read($, lauf),
wahl: await read($, karten),
zellen: e.props.bodyColumns,
entwurf: festEntwurf,
}
// Das Terminal hat kein Svg, die mobile App weder Select noch Eingabefeld: dort
// zeichnet der Ersatz.
if (e.surface === 'terminal') {
const { Box, Text, Button, Select, Input } = $.ui.resolve(e)
return zeichneKartenLeiste({ Box, Text, Button, Select, Svg: null, Input }, lage, tatenVon($))
}
if (e.surface === 'mobile') {
const { Box, Text, Button, Svg } = $.ui.resolve(e)
return zeichneKartenLeiste({ Box, Text, Button, Select: null, Svg, Input: null }, lage, tatenVon($))
}
const { Box, Text, Button, Select, Svg, Input } = $.ui.resolve(e)
return zeichneKartenLeiste({ Box, Text, Button, Select, Svg, Input }, lage, tatenVon($))
})plugins/ziel-graph/hooks/karten/leiste.tsx 595〜711 行 · ペイン
export const zeichneKartenLeiste = (teile: Teile, lage: KartenLage, taten: Taten): RenderElement => {
const { Box, Text, Button } = teile
const { stand, laufend, wahl } = lage
const plan = stand.plan ?? LEERER_PLAN
// Offene Tickets, die es beim letzten Ableiten noch nicht gab: Sie stehen in keinem Bündel.
const neue = neueTicketsZeile(stand.neueTickets)
// Ein Dauerläufer, an dem gerade niemand arbeitet, ruht: Seine Spalte zeigt eine Karte.
const ruhend = ruhende(plan, laufend, laufend.gelesen || stand.gelesen)
const bild = sicht(plan, laufend, wahl.wahl, stand.aenderungen, ruhend)
const flaeche =
stand.plan === null || teile.Svg === null ? null : baueFlaeche(bild, { zellen: lage.zellen, farben: wahl.farben })
const steht = flaeche?.art === 'neben'
const karten =
stand.plan === null
? null
: flaeche === null
? zeichneListe(teile, plan, bild, taten)
: zeichneFlaeche(teile, plan, flaeche, taten)
const zurKarte = zeichneDetail(
teile,
plan,
detail(plan, laufend, bild.gewaehlt),
laufend.gelesen,
steht ? Math.floor(DETAIL / ZELLE_PX) : null,
taten,
)
return (
<Box flexDirection="column" gap={1}>
{stand.plan !== null && (
<Box flexDirection="column">
<Box flexDirection="row" flexWrap="wrap" columnGap={1} alignItems="center">
<Text bold wrap="wrap">
{endzielZeile(plan)}
</Text>
{plan.endziel.herkunft !== 'goal' && (
<Button key="endziel-festlegen" label="Endziel festlegen" onPress={() => taten.lege(endzielAuftrag(plan))} />
)}
</Box>
<Text dimColor wrap="wrap">
{bild.zaehler}
</Text>
{stand.fakten !== null && (
<Text dimColor wrap="wrap">
{faktenZeile(stand.fakten, laufend.gelesen || stand.gelesen)}
</Text>
)}
{neue !== '' && <Text wrap="wrap">{neue}</Text>}
</Box>
)}
{zeichneGoal(teile, stand, taten)}
{zeichneFertige(teile, stand, taten)}
{zeichneKopf(teile, lage, taten)}
{zeichneFestEingabe(teile, lage, taten)}
{zeichneAenderungen(teile, stand)}
{steht ? (
<Box flexDirection="row" alignItems="flex-start" columnGap={2}>
{karten}
{zurKarte}
</Box>
) : (
karten
)}
{bild.ohneKarte.length > 0 && (
<Box flexDirection="column">
<Text bold wrap="wrap">
{stand.plan === null ? 'Laufende Chats' : 'Chats ohne Karte'}
</Text>
{bild.ohneKarte.map(chat => (
<Button
key={`karte-${chatId(chat.id)}`}
plain
label={
`${chatId(chat.id) === bild.gewaehlt ? '▸' : ' '} ${chat.frage === '' ? '○' : '●'} ${nameVon(chat)}` +
`${chat.frage === '' ? '' : ' · wartet auf dich'}${chat.id === laufend.ich ? ' (dieser Chat)' : ''}`
}
onPress={() => taten.waehle(chatId(chat.id))}
/>
))}
</Box>
)}
{!steht && (stand.plan !== null || bild.ohneKarte.length > 0) && zurKarte}
{zeichneFestListe(teile, stand, taten)}
{stand.warnungen.length > 0 && (
<Box flexDirection="column">
<Text bold wrap="wrap">
{`Beim Ableiten aufgefallen (${stand.warnungen.length})`}
</Text>
{stand.warnungen.slice(0, HINWEISE).map(one => (
<Text dimColor wrap="wrap">
{`– ${one}`}
</Text>
))}
{stand.warnungen.length > HINWEISE && (
<Text dimColor wrap="wrap">
{`… und ${stand.warnungen.length - HINWEISE} weitere in der Datei des Plans.`}
</Text>
)}
</Box>
)}
{stand.plan !== null && (
<Text dimColor wrap="wrap">
{'Diesen Plan hat ein Modell aus GOAL.md, Doku, Chats und Git-Verlauf abgeleitet. ' +
'Festgelegt ist nur, was in GOAL.md steht und was du als Festlegung eingegeben hast.' +
(stand.fakten === null || stand.fakten.datei === '' ? '' : ` Der Plan liegt in ${stand.fakten.datei}.`)}
</Text>
)}
</Box>
)
}plugins/ziel-graph/hooks/karten/leiste.tsx 412〜444 行 · ペイン
const zeichneGoal = (teile: Teile, stand: ZielGraphGeladen, taten: Taten): RenderElement | null => {
const { Box, Text, Button } = teile
const { goal } = stand
if (!goal.vorhanden || goal.leer) {
return (
<Box flexDirection="column">
<Text bold wrap="wrap">
{goal.vorhanden ? 'GOAL.md ist noch leer' : 'GOAL.md fehlt'}
</Text>
<Text wrap="wrap">
{'GOAL.md in der Wurzel des Repos ist der Anker des Plans: Sie nennt das Endziel, die ' +
'Zwischenziele und je Strang sein Ziel, und ohne sie ist hier alles über Ziele nur vermutet.'}
</Text>
<Box>
<Button
key="goal-anlegen"
label="GOAL.md mit dem Chat entwerfen"
variant="primary"
onPress={() => taten.lege(goalAuftrag())}
/>
</Box>
</Box>
)
}
return goal.geaendert && stand.plan !== null ? (
<Text wrap="wrap">
{'GOAL.md hat sich seit dem letzten Ableiten geändert. Ihre Ziele und Stränge stehen schon ' +
'hier; „Neu ableiten“ ordnet die Bündel neu zu.'}
</Text>
) : null
}plugins/ziel-graph/hooks/karten/leiste.tsx 449〜477 行 · ペイン
const zeichneFertige = (teile: Teile, stand: ZielGraphGeladen, taten: Taten): RenderElement | null => {
const { Box, Text, Button } = teile
const { goal, plan } = stand
if (plan === null || !goal.vorhanden || goal.leer) {
return null
}
const fertige = fertigeZiele(plan)
if (fertige.length === 0) {
return null
}
return (
<Box flexDirection="column">
{fertige.map(strang => (
<Box flexDirection="row" flexWrap="wrap" columnGap={1} alignItems="center">
<Text wrap="wrap">{fertigZeile(strang)}</Text>
<Button
key={`dauer-${strang.id}`}
label="Zum Dauerläufer machen"
onPress={() => taten.lege(dauerAuftrag(plan, strang.id))}
/>
</Box>
))}
</Box>
)
}plugins/ziel-graph/hooks/karten/leiste.tsx 348〜408 行 · ペイン
const zeichneKopf = (teile: Teile, lage: KartenLage, taten: Taten): RenderElement => {
const { Box, Text, Button, Select, Svg } = teile
const { stand, jetzt, wahl } = lage
const { plan } = stand
const status = laufZeile(jetzt)
const naechsteFarbe = FARBEN[(FARBEN.findIndex(one => one.value === wahl.farben) + 1) % FARBEN.length]
return (
<Box flexDirection="column">
{status !== '' && (
<Text bold wrap="wrap">
{status}
</Text>
)}
{jetzt.phase === 'laeuft' && (
<Text dimColor wrap="wrap">
{`Ein Modell-Aufruf mit ${MODELL} liest GOAL.md, Doku, Chats und Commits des Repos. ` +
'Die Leiste zeigt den Plan, sobald er fertig ist.'}
</Text>
)}
{jetzt.phase === 'fehler' && plan !== null && (
<Text dimColor wrap="wrap">
Darunter steht weiter der vorige Plan.
</Text>
)}
{jetzt.phase !== 'laeuft' && plan === null && (
<Text wrap="wrap">
{'Noch kein Plan für dieses Repo. „Neu ableiten“ liest GOAL.md, README.md, CLAUDE.md und ' +
'die Doku unter docs/, die laufenden Chats und die letzten 30 Commits. Daraus leitet ein ' +
'Modell-Aufruf den Plan ab.'}
</Text>
)}
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
<Button
key="neu"
label="Neu ableiten"
variant={plan === null ? 'primary' : 'secondary'}
dimColor={jetzt.phase === 'laeuft'}
onPress={taten.ableiten}
/>
<Button key="laden" label="Neu laden" onPress={taten.laden} />
{Svg !== null && Select !== null && (
<Select
key="farben"
label="Farben"
options={FARBEN}
value={wahl.farben}
onSelect={wert => taten.faerbe(FARBEN.find(one => one.value === wert)?.value ?? 'auto')}
/>
)}
{Svg !== null && Select === null && (
<Button
key="farben"
label={`Farben: ${FARBEN.find(one => one.value === wahl.farben)?.label ?? 'Auto'}`}
onPress={() => taten.faerbe(naechsteFarbe?.value ?? 'auto')}
/>
)}
</Box>
</Box>
)
}plugins/ziel-graph/hooks/karten/leiste.tsx 483〜533 行 · ペイン
const zeichneFestEingabe = (teile: Teile, lage: KartenLage, taten: Taten): RenderElement => {
const { Box, Text, Button, Input } = teile
const { stand } = lage
const { liste, geaendert } = stand.festlegungen
const hatLokale = liste.some(one => one.ort === 'lokal')
return (
<Box flexDirection="column">
<Text bold wrap="wrap">
{festZeile(liste)}
</Text>
{liste.length === 0 && (
<Text dimColor wrap="wrap">
{'Eine Festlegung ist ein Satz von dir, der bei jedem Ableiten gewinnt: wohin etwas ' +
'gehört, was zuerst kommt, was zusammengehört.'}
</Text>
)}
{geaendert && stand.plan !== null && (
<Text wrap="wrap">
Die Festlegungen sind andere als beim letzten Ableiten: „Neu ableiten“ wendet sie an.
</Text>
)}
{Input === null ? (
<Text dimColor wrap="wrap">
Diese Oberfläche zeichnet kein Eingabefeld: Eine neue Festlegung gibst du am Rechner ein.
</Text>
) : (
<Input
key="fest-eingabe"
placeholder="Neue Festlegung: ein Satz, der bei jedem Ableiten gewinnt …"
value={lage.entwurf}
submitLabel="festlegen"
onInput={wert => taten.merkeFest(wert)}
onSubmit={wert => taten.festlegen(wert)}
/>
)}
{(Input !== null || hatLokale) && (
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
{Input !== null && <Button key="festlegen" label="Festlegen" onPress={() => taten.festlegen()} />}
{hatLokale && (
<Button
key="fest-eintragen"
label="In GOAL.md eintragen lassen"
onPress={() => taten.lege(festAuftrag(liste, stand.goal.vorhanden))}
/>
)}
</Box>
)}
</Box>
)
}ライセンスの全文(MIT)
MIT License Copyright (c) 2026 Tzy197 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.
コードが呼ぶもの
プログラム起動ファイル書き込み環境変数Claude を動かす
コードから読み取ったデザイン
読み取ったコミットのソースから描いたもので、動かした結果ではありません。一覧は 3 回描き、条件はデスクトップアプリで描く最初の分岐を取り、動かしたときにだけ決まる値は仮の例(点線の下線)にするか省きます。色と書体はこのサイトのものです。
コードから読めること
2026-10-06 に読んだコミット 6be3c7828efa のソースから。最初のまとまりが載せる条件で、残りは自分で判断するための材料です。後のコミットは、次に読むまで見ていません。
| 載せる条件: 確かめやすいコード | |
|---|---|
| 入口を読んだ | hooks/hooks.json が名指すモジュールをすべて読んだ。plugins/ziel-graph/hooks/register.tsx |
| 解析できる | すべてのファイルが TypeScript か JavaScript として解析できる。27 ファイルを解析 |
| コードが Mod の中で完結 | import は Mod 自身のファイルかエンジンのモジュールだけ。パッケージも require もない。コードはすべて Mod の中 |
| 読める | 圧縮した行・eval・new Function・計算した道の import()・符号化した塊がない。圧縮・eval・符号化した塊なし |
| 呼び出しが見える | 通信とプログラム起動はその場で $.http.fetch・$.process.run と書き、他へ渡さない。外への呼び出しはすべてその場の $ で |
| 入れる前に自分で判断する材料 | |
| 描く場所 | コードから読んだ、描く先。ターミナル・デスクトップアプリ・両方・何も描かない(フックだけ: 見張りやプロンプトの書き換え)のどれか。出すだけで、外す理由にはしない。ターミナルとデスクトップアプリに同じように描く |
| 入れる手順 | リポジトリ自身の .claude-plugin/marketplace.json にこの Mod が載っていて、ページに書いた手順でそのマーケットプレイスから入れられるか。リポジトリの .claude-plugin/marketplace.json に載っており、そこから入れられる |
| Windows のプログラム | $.process で起動するプログラムが Windows にあるか(tail・date・open・osascript・/usr/… などは無い)。Windows にないプログラムを使わない |
| 通信 | fetch の送り先(https のホスト)がコードに書いてあるか。通信なし |
| プログラム | 起動するプログラムの名前がコードに書いてあり、シェル・インタプリタ・通信用の道具でないか。plugins/ziel-graph/hooks/register.tsx:87 実行時に決まるプログラム |
| 読んで送る | ファイルや環境変数を読み、かつ通信するか。通信しない |
| ソースの鍵 | ソースに API キーや秘密鍵らしきものがあるか。ソースに鍵なし |
| ライセンス | オープンなライセンス(MIT・Apache-2.0・BSD・ISC・Unlicense・0BSD・CC0)で全文があれば、modscode にコードを載せる。違えばリンクだけ。MIT |
コードの文面を読んだだけで、安全の審査ではありません。動かしてはおらず、起動するプログラムの中で何が起きるかも見えません。入れる前の確認はあなたの役目です。 載せる条件
入れる
入れる前に、必ず自分で確かめてください。Mod はサンドボックスなしで、あなたの権限で動きます。modscode はこのコードの安全を保証しません。下のコードを読み(またはフォルダーで claude plugin validate .)、触るものを見て、読んだコミットを入れてください。
リポジトリがそのままマーケットプレイスです。このマーケットプレイスを足し(ターミナルでは次のコマンド、デスクトップアプリではプラグインの設定)、そこから Mod を入れます。
/plugin marketplace add Tzy197/claude-mods/plugin install ziel-graph@claude-mods入るのはマーケットプレイスの最新のコミットで、ここで読んだもの(6be3c7828efa)と違うことがあります。入れる前に見比べてください。
Claude に聞く
modscode のコネクタを入れると、Claude がこのデザイン・コードが触るもの・コードを読んで、それをもとに作れます。たとえば:
modscode のデザイン「tzy197-ziel-graph」をコードごと読んで、同じようなペインを作って似たデザイン
-
Claude に頼む…Skins0 Your promptadd rate limiting to the hub api0 Tool rows: finished, running, failedYour prompt Spinner0 Folded group of reads and searches●main · note 3 · note 3 · note 30 Edit diff cardDesktop only; the terminal keeps Claude Code's diff.0 Shell output cardDesktop only.0 Code block cardDesktop only; the terminal keeps Claude Code's markdown.0 TableAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentCopyAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentCopyAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentCopy0 SpinnerAccent SpinnerSpinnerSpinner… 2h 10m0 Band above the prompt: normal, then nudging to compact█████░░░ 42% build█████░░░ 42% build█████░░░ 42% buildContext is 42% full0 Compact now0 Band above a questionTable BashBashBash0 Turn footer (terminal)3 build in 2h 10m · Grep · +3 −3
-
Claude に頼む…agent-discoverbuildbuildbuildRefreshMCP Browse/3Tab / shift+Tab move · Enter presses · ↑↓ scroll · Esc back to the promptBrowse...Audit asks:DeclineAcceptDeclineCancelAudit asks:DeclineAcceptDeclineCancelAudit asks:DeclineAcceptDeclineCancel
-
Claude に頼む…Fanyi settingsOnAPI · OpusenOn this MacAPIHost src/ SaveKey K · paste a new one, Enter SaveOpus↻ RefreshCustom model model id, for an API that lists none UseFanyi settingsHostClose
-
Claude に頼む…Commands●command-hubreading commands…+ create 3+ create 3+ create 3Prompt3 of 3 commandsReading the installed commands… they appear here in a moment.Save command/buildCommands/buildCommands/buildCommandsSave command/buildCommands/buildCommands/buildCommandsSave command/buildCommands/buildCommands/buildCommands
-
Claude に頼む…Model routerLast reply: Fix login → a1b2c3dKept off Opus to save the cache. Start a prompt with @Opus to force it.OnOffRoutes model and effort for each kind of prompt0 Fix loginbuildbuildbuildbuildbuildbuild0 Fix loginbuildbuildbuildbuildbuildbuild0 Fix loginbuildbuildbuildbuildbuildbuildYour rules checked firstNo rules yet. Pick a model and effort, type the words, press Add rule.Tasksa1b2c3d✕Tasksa1b2c3d✕Tasksa1b2c3d✕words, for example landing page, redesign Add rulebuildbuildbuildbuildbuildbuildOptions CoolingWhen still broken after xhigh, move tobuildbuildbuildCache saver: skip one-off model switches in long chatsbuildbuildbuildOne prompt only: start it with @opus, @max or @hardReset
-
Claude に頼む…diff reviewbranch buncommitted u更新 r|split punified n折り返し w|生成ファイルを隠す (3) g:defaultbase: 読み込み中...差分はありません自動生成ファイルの差分だけです (g で表示)42%42%33●42%33●42%33●src/app.tsを起点に選択中。同じ行をもう一度押すと1行、同じ側の別の行を押すと範囲でコメントできます選択解除src/app.ts から名前変更変更前│変更後... 以降は省略していますsrc/app.tsを起点に選択中。同じ行をもう一度押すと1行、同じ側の別の行を押すと範囲でコメントできます選択解除src/app.ts から名前変更変更前│変更後... 以降は省略しています行指定 R12 本文 / L3-5 本文 (L=変更前の行, R=変更後の行, 省略時 R) 追加xsrc/app.ts:buildxsrc/app.ts:buildxsrc/app.ts:buildClaude に渡す (3) sコメントを消す