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

spec-graph

プロジェクトの仕様書を探して読み、コードの境界や契約、設計判断に沿って変更を進め、必要に応じて仕様書も更新・検証するスキルです。

原文原文の説明を見る

Use when locating, reading, creating, updating, or validating project specs, or when work is governed by or may alter a documented boundary, contract, invariant, behavior, or architecture decision.

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • 変更に関係する仕様書を探したいとき
  • モジュールの境界や契約を確認したいとき
  • 設計判断を仕様書に記録したいとき
  • 変更に合わせて仕様書を更新したいとき
  • 仕様書のリンク構造を検証したいとき

日本語での紹介

できること

プロジェクトの仕様書を、コードだけでは分からない設計意図や判断、契約、境界を記録した基準として扱います。作業対象に関係する仕様を spec_grep、spec_get、spec_graph で探し、必要な範囲を読んで実装と照らし合わせます。仕様に書かれた判断と変更内容が食い違う場合は、そのまま進めず矛盾を明らかにして整理します。境界や契約、設計判断を変える作業では仕様書も更新し、構造変更後には spec_validate でリンク切れや重複ID、親子関係の循環を確認します。

仕様書には、モジュールの役割や依存関係など、コードから明らかでない意図を簡潔に記録します。ファイル一覧やコードの言い換えを並べるのではなく、情報を一つの仕様書にまとめ、他の文書から参照できる形を保ちます。局所的な修正で仕様上の判断が変わらない場合は、関係する範囲だけを確認します。

こんなときに便利

既存の設計判断を確認してからコードを変更したいときや、モジュール間の責任範囲を把握したいときに使えます。コードの変更に伴って仕様が古くなるのを防ぎたい場合や、仕様書どうしのリンクを点検したい場合にも向いています。

使い方の例

  • 「このモジュールに関係する仕様書を探して」
  • 「この変更で境界や契約が変わるか確認して、仕様も更新して」
  • 「仕様書のリンクや親子関係を検証して」

注意点

仕様検索・管理には spec_grep、spec_get、spec_graph、spec_create、spec_update、spec_delete、spec_validate を使います。文書本文の編集と読み取りには通常の read、write、edit ツールを使います。

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

含まれるファイル(1)

  • SKILL.md5.3 KB

SKILL.md(原文)

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

Spec graph

Specs are the ground truth

  • Specs describe the architecture, decisions, contracts, and boundaries behind the code — the intent that the code alone does not reveal. Treat them as authoritative.
  • Consult the owning spec when it governs the work. When work depends on, checks, explains, or may alter a documented boundary, contract, invariant, behavior, or architecture decision, use spec_grep / spec_get / spec_graph to find the applicable record and align with it. If a change contradicts a recorded decision, surface and reconcile the contradiction rather than silently diverging.
  • Keep lookup proportional. Specs are the map for decisions and boundaries; code confirms the implementation. A localized fix, explanation, or check that changes no documented decision may inspect only the files it needs without reading unrelated specs.
  • Keep them honest. A change that moves or blurs a boundary, or overturns a decision, updates the spec as part of the same change. Specs that drift from the code stop being ground truth.

What a spec is

  • A durable, declarative document. It states the world as it is — the intent, decisions, contracts, and boundaries behind the code — not plans, tasks, phases, or a work journey.
  • Concise and readable. It captures what is not obvious from the code; it never restates the code.
  • The bar: reading the relevant specs should be enough to understand an area and to formulate a task to improve it.

Keep specs lean

  • Explain intent, not inventory. Describe what a module is for, what it owns, and where its boundaries are — not a file-by-file transcript of its directory. The reader can see the files; the spec exists for what the files don't say.
  • Record the edges that matter. State the module's boundary (allowed / forbidden deps) and the dependency edges between its sub-modules. List a part only when its role or its edges aren't obvious from its name — e.g. a small table that carries a real dependency DAG earns its place; a table that just pairs foo.ts with "the foo tool" is noise, so say it in a sentence instead.
  • Say each thing once. A fact lives in exactly one spec; others link to it by id rather than restate it. If a paragraph is being copied between specs, move it to the spec that owns the concept and point at it. Duplicated prose drifts and turns into contradictions.
  • Prefer prose to exhaustive tables, and cut anything that only paraphrases code, filenames, or a sibling spec.

The graph

  • parent links form a hierarchy that mirrors the code structure: a SPEC.md sits beside the module it describes (fractal — a package and its sub-directories each have one), and root documents sit at the repository root.
  • depends-on, references, and implements form a dependency layer across the tree.

Frontmatter

  • Required: id (a unique slug), type, title.
  • Optional: status (lifecycle), parent (single link), depends-on / references / implements (link lists), covers, tags.
  • A file is a spec when its frontmatter carries id and type.
  • status tracks a spec's lifecycle: draft (being written) → active (in force), then stale (drifting from the code), done, or deprecated. It's optional, but keep it current as a spec firms up or ages.
  • Types:
    • goal-and-requirements — the product goal and scope; the root of the graph.
    • architecture-design — system-wide topology, cross-cutting decisions, and invariants.
    • module-design — a package or module's responsibility and boundary.
    • submodule-design — the same, for a directory-level module inside a package.
    • task-spec — a temporary working document for a piece of work; not durable, and removed once the work lands.

Tools

Read:

  • spec_grep — search within specs (content, narrowed by metadata filters).
  • spec_get — a spec's frontmatter, its resolved links, and its path. Read the body with the normal read tool using that path.
  • spec_graph — a bounded slice of the graph: a subtree, ancestors, or a node's neighbors, to a depth.

Manage:

  • spec_create — a new spec with scaffolded frontmatter and headings.
  • spec_update — a spec's frontmatter (fields and links). It does not touch the body.
  • spec_delete — remove a spec.
  • spec_validate — report dangling links, duplicate ids, and parent cycles.

Prose is written and edited with the normal write/edit tools; the spec tools own frontmatter and structure.

Working with specs

  1. Orient when specs govern the work. From a known root or the module you are touching, use spec_graph for the neighborhood, spec_get for a node's metadata, and read for its body. Use spec_grep to find specs by content.
  2. Align. Reconcile the change with the decisions and contracts the specs record; surface contradictions before diverging.
  3. Update. When the change alters a boundary, contract, or decision, update the spec — frontmatter (including status) with spec_update, prose with edit — and add spec_create for a new module.
  4. Check. Run spec_validate after structural changes.

レビュー

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

コメント

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

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

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

0 / 1000 文字

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

同じリポジトリのスキル

asking-user-questions

無料概要あり

質問を段階ごとに整理し、ユーザーが判断すべき点を具体的な選択肢で尋ねるための共通ルールを示します。

  • 機能の範囲や挙動を確認したいとき
  • 回答に応じて質問を段階的に進めたいとき
  • 推測した内容を選択肢付きで確認したいとき
JetBrains/thinkrail1,7652026年10月26日 更新

brainstorming

無料概要あり

機能追加や挙動変更、バグ修正の前に、目的や要件を整理して設計案を合意し、実装後に仕様書へ反映するスキルです。

  • 実装前に要件を整理したいとき
  • 機能の設計を相談したいとき
  • バグの原因と修正方針をまとめたいとき
JetBrains/thinkrail1,7652026年10月26日 更新

choosing-a-workflow

無料概要あり

新規プロジェクトの準備、PRの作成・確認、機能追加や不具合修正など、作業内容に応じて次に従うワークフローを選びます。

  • 新規プロジェクトの進め方を決めたいとき
  • 機能追加や不具合修正の経路を選びたいとき
  • PRの確認やレビュー対応を進めたいとき
JetBrains/thinkrail1,7652026年10月26日 更新

importing-a-codebase

無料概要あり

仕様書のない既存コードベースを調べ、コードや資料から目的・構成・依存関係を読み解いて、初期仕様グラフを草案として組み立てます。

  • 仕様のない既存コードを文書化したいとき
  • モジュール構成と依存関係を整理したいとき
  • 既存の設計資料を仕様グラフに取り込みたいとき
JetBrains/thinkrail1,7652026年10月26日 更新

managing-mcp-servers

無料概要あり

ThinkRailのMCPサーバー設定を追加・変更・削除し、ツールの接続不具合やサインイン、利用承認に必要な手順を案内するスキルです。

  • MCPサーバーを追加・削除したいとき
  • MCPの設定や公開方法を変更したいとき
  • MCPツールの接続不具合を調べたいとき
JetBrains/thinkrail1,7652026年10月26日 更新

setting-up-a-project

無料概要あり

仕様グラフがないプロジェクトの状態を確認し、新規企画か既存コードかに応じて、仕様作成の適切な手順へ案内します。

  • 新規プロジェクトの仕様作成を始めたいとき
  • 既存コードを仕様グラフに整理したいとき
  • 既存仕様の不足を確認したいとき
JetBrains/thinkrail1,7652026年10月26日 更新

JetBrains のスキルをすべて見る

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