本文へ移動
cccskills
無料GitHub で公開日本語紹介

mex-statechart

既存コードの複雑な動きや障害・復旧の流れを状態図にし、TLA+や実際の動作と照らして検証しながら説明するスキルです。

原文原文の説明を見る

Explain complicated existing behavior using checked state diagrams. Use when asked for a state diagram, to diagram the previous explanation, show a bug or recovery path, compare a proposed fix or existing TLA+ spec, or derive a model from an agreed chart. Generates native Mermaid and a readable terminal fallback; optionally view and explicitly save in MEX Hub.

mex-memory/mexスター 1,781(GitHub 1,781 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • 複雑な処理の状態遷移を図にしたいとき
  • 障害と復旧の経路を説明したいとき
  • 修正案と現在の動作を比較したいとき
  • TLA+仕様と図を照合したいとき

日本語での紹介

できること

コードや合意済みのモデルをもとに、複雑な振る舞いを状態図に整理します。状態、イベント、条件、例外、復旧の関係を絞って示し、Mermaid形式の図と、端末でも読めるテキスト表示を用意します。TLA+仕様がある場合は図やモデルと照合し、利用可能ならTLCで検査します。バグの再現結果、ソースコードから確認できる根拠、再現できなかった点は分けて説明します。

こんなときに便利

既存機能の動作を説明したいとき、障害からの復旧手順を図にしたいとき、修正案やTLA+仕様との違いを確かめたいときに向いています。

使い方の例

  • 「この処理の状態遷移を図にして、失敗時の復旧経路も示して」
  • 「提案した修正を現在の動作と状態図で比較して」
  • 「この合意済みの状態図からモデルを作り、検査して」

注意点

検査結果は設定したモデルと範囲に対するものです。TLCが利用できない場合も図は作成できますが、検査は未実施として扱います。MEX Hubへの保存は明示的な操作が必要です。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(30)

  • SKILL.md5.8 KB
  • agents/openai.yaml207 B
  • PROVENANCE.md1.4 KB
  • references/artifact.md6.3 KB
  • references/example.json3.2 KB
  • references/toolchain.md6.5 KB
  • references/upstream-workflow.md7.5 KB
  • upstream/LICENSE1.0 KB
  • upstream/scripts/bug-states.mjs3.0 KB
  • upstream/scripts/chart-edges.mjs2.4 KB
  • upstream/scripts/chart-parts.mjs613 B
  • upstream/scripts/chart-to-tla.mjs7.7 KB
  • upstream/scripts/compare-charts.mjs2.2 KB
  • upstream/scripts/lib.mjs33.4 KB
  • upstream/scripts/map-view.mjs3.4 KB
  • upstream/scripts/property-loop.mjs2.3 KB
  • upstream/scripts/read-check.mjs2.8 KB
  • upstream/scripts/regions-chart.mjs10.7 KB
  • upstream/scripts/render.mjs18.7 KB
  • upstream/scripts/rule-book.mjs3.3 KB
  • upstream/scripts/second-replay.mjs4.7 KB
  • upstream/scripts/snapshot.mjs2.0 KB
  • upstream/scripts/spec-text.mjs5.7 KB
  • upstream/scripts/statechart-help.mjs25.9 KB
  • upstream/scripts/statechart.mjs35.3 KB
  • upstream/scripts/tlc-to-chart-args.mjs2.1 KB
  • upstream/scripts/tlc-to-chart.mjs29.5 KB
  • upstream/scripts/tlc-tools.mjs3.3 KB
  • upstream/scripts/ways-in.mjs3.0 KB
  • upstream/SHA256.json2.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

MEX statechart

Make behavior easier for a human to understand. Generate only on user intent. If a diagram would obscure the explanation, use a better explanation. A prior agent answer identifies the subject; verify it independently against current code.

  1. Identify the bounded subject, reader, and implemented/proposed/agreed-model scope. Read current source and useful tests. Query mex wiki query "<subject>" --limit 5 --json before broad knowledge discovery; inspect matched terms and grounding health, then read live records. Fall back to Router-directed Markdown if unavailable. Use bounded mex timeline --query "subject" --file known/path --limit 10 --json only when history might matter. Verify historical applicability. Fresh Graph may locate evidence; call edges are not state transitions. Never refresh indexes on a read.
  2. Retain context only when it changes or explains a state, event, condition, rule, exception, recovery, or abstraction. Record the precise connection and provenance. Keep source/requirement conflicts visible. Omit irrelevant context; do not manufacture a MEX contribution.
  3. Read the baseline modeling workflow and runtime instructions. Preserve TLA+ and real TLC checks in normal generation. Reuse agreed rules with provenance; seek agreement only for new inferred rules or material conflicts. Never weaken a rule to get a passing result.
  4. Work outside the repository in scratch space. Use the bounded scripts/runtime.mjs workflow entry, not the unbounded original scripts directly. Preserve existing TLA+ reference specifications and their authored configurations unchanged. Both from-spec and agreed-chart directions, settled-state rules, narrower observation points, projected overviews, independent regions, goals, proposed fixes and reference comparisons remain available.
  5. Assemble and validate the v1 artifact described in artifact contract. Retain models, configs, mapping, rules, raw temporal traces, omissions, toolchain and regeneration. Use stable identities, not captions. Run check on the artifact to record actual TLC results. For finite traces, map every numbered state/action back to the same graph and retain raw counterexamples. Goals are expected reachability witnesses, never product bugs. Use runtime summary counts, not counts inferred from the drawing. Missing mappings leave alignment unverified. Projection.json is optional: without it, or when check leaves the diagram unverified, accept and disclose that; never write your own TLC output parsers to force a projection. If TLC is unavailable (run status), still assemble the artifact with the check left unavailable and continue to step 7: the picture never depends on Java or TLC.
  6. Attempt each modeled implementation bug through real observable code entry points. Separate what execution reproduced, what source inspection supports, and what was not reproduced. Revisit the model when reproduction disagrees. A passing model proves only the configured model and bounds; unavailable/cancelled/resource-limited checking is never success.
  7. Run show <artifact> <scratch-dir> once: it prints the deterministic text view and writes the artifact's own diagram.mmd and diagram.png. Deliver by client:
    • Claude Code (terminal and desktop app) does not render Mermaid. Paste the text view in a fenced text block, then always open the printed diagram.png with your file-reading tool, unasked: the desktop app shows it inline. Make that read its own step: first write one short sentence such as "Here is the diagram:", then read the PNG with no other tool call before or after it, because the desktop app collapses grouped tool calls into a small thumbnail. Do not embed the image as Markdown; local image links do not render. In the terminal show also opens the image in the system viewer; tell the user, and give the path. Never present raw Mermaid as the diagram there.
    • Clients with native Mermaid, such as Codex: deliver the artifact's fenced Mermaid first, and the text view for nested or parallel charts. Never hand-draw the diagram as text art; show produces both views. If the image is unavailable, say so and give the .mmd path. Keep domain labels readable; details belong beside the overview. Disclose every material omission. Inspect the image and numbered paths as generation QA. State diagram validity, checker outcome, implementation reproduction, and evidence freshness separately.
  8. register the validated artifact into the repository's ignored temporary preview store; this is checkout-only and nothing is shared. Keep its returned route and 24-hour expiry. Offer to open the specific diagram in Hub: for example, "Want me to open this in Hub? I can start it for you." When this repository's live Hub URL is already known, provide a clickable "View this diagram in Hub" link directly to the preview. Otherwise offer to start Hub; do not make the user run a command and find Diagrams themselves. Accepting the offer, or directly asking to open it, authorizes normal Hub startup and browser opening without another confirmation. Follow Opening the preview in Hub to preserve authentication and open the returned preview route. Generation alone does not launch Hub; never invent a localhost URL. Hub Save still requires its own exact review; commit/push remains separate. Regeneration creates a new preview and never updates old evidence baselines.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

mex-inbox

無料概要あり

チームの決定や規約、設計メモを既存のWikiと照らして整理し、プロジェクト知識やSpecの追加・修正提案としてレビューに回すスキルです。

  • チームの決定をWikiに残したいとき
  • 規約や設計メモを修正したいとき
  • 既存Specへの追加案を作りたいとき
mex-memory/mex1,7812026年10月29日 更新

mex-inbox

無料概要あり

チームで決まった方針や設計上の知見を、既存のプロジェクト知識に沿ったレビュー用の提案にまとめるスキルです。

  • チームの決定を知識として残したいとき
  • 既存ガイドの修正案を作りたいとき
  • Specの変更提案をまとめたいとき
mex-memory/mex1,7812026年10月29日 更新

mex-relay

無料概要あり

作業の進捗、判断、残っている課題、次の手順をまとめ、別の担当者が続きから取り組めるMEX Relayを作成・管理します。

  • 作業終了時に引き継ぎを残したいとき
  • 次の担当者に状況を伝えたいとき
  • Relayを引き受けたり閉じたりしたいとき
mex-memory/mex1,7812026年10月29日 更新

mex-relay

無料概要あり

作業の進捗や未解決事項、次の手順を整理し、チームのメンバーが続きから取り組める引き継ぎ用のRelayを作成・管理します。

  • セッション終了時の引き継ぎを残したいとき
  • 別の担当者に作業を渡したいとき
  • Relayを引き受けたり閉じたりしたいとき
mex-memory/mex1,7812026年10月29日 更新

mex-memory のスキルをすべて見る

このスキルの問題を報告する