曖昧なアイデアを質問と多角的な検討で仮説やRFC要約に整理し、必要に応じて詳細設計へ引き継ぐスキルです。
- 初期の機能案を具体化したいとき
- 前提や制約を洗い出したいとき
- チーム相談用の企画概要を作りたいとき
リポジトリ内のソースコードを調べ、各ディレクトリの役割や公開インターフェース、制約をまとめたREADME.mdを階層的に作成・更新するスキルです。
Bootstrap directory README.md files across a repository subtree.
実行スコア 未検証
インストール方法を見るリポジトリ内のディレクトリを調べ、ソースコードのある場所にはファイルごとの役割や公開インターフェースを記したREADME.mdを作成・更新します。子ディレクトリの情報を親階層にまとめ、リポジトリ全体の構成をたどれる設計資料にします。既存のREADME.mdがある場合は内容を読み、開発者の説明を残しながら契約情報を整えます。対象ファイル名は変更でき、README.md以外の名前も指定できます。ディレクトリ数に応じて直接処理するか、サブエージェントで分担する手順が定められています。
コードの構成や各パッケージの境界を文書化したいときや、階層ごとに分散した説明を整理したいときに向いています。人とAIエージェントが同じ前提で開発できるよう、インターフェース、制約、副作用をコードに基づいて明示します。
対象のルートパスが必要です。機能コードは生成せず、文書のみを扱います。15を超えるサブディレクトリを処理する場合は、全体処理を進める前に利用者の承認を求める仕様です。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
egm-bootstrap)When running in Codex or ChatGPT Work, first read Codex integration.
In Claude Code or Cowork, read ${CLAUDE_PLUGIN_ROOT}/docs/claude.md first.
This skill automates the creation, correction, formatting, and correctness
verification of Elephant-and-Goldfish Model (EGM) compliant README.md files
across a directory tree. It establishes clear architectural contracts
(interfaces, invariants, and side effects) for both human developers and AI
assistants.
A Goldfish runs in a fresh context with no conversation history. Spawn each
subagent with your harness's subagent tool (Antigravity: invoke_subagent; Claude Code: Agent; Codex: spawn_agent). Each subagent is defined in agents/<file>.md, and its
frontmatter name (for example egm-zoom-out) is the subagent type to request
where your harness registers named subagents. Otherwise spawn a general-purpose
subagent and tell it to read that persona file first. Pass the prompt verbatim
and wait for the report. If your harness cannot nest subagents,
use direct dispatch instead of the synthesizer. See docs/harnesses.md.
If your harness has no subagent tool, run the scout steps inline.
path: The target root directory path to bootstrap (Required).is_worker: Internal parameter. true if executing as a worker
Sub-Orchestrator (Optional, default: false).sub_tree_root: Internal parameter. The root path of the assigned
subtree partition (Optional).target_filename: Target contract filename to generate or update
(Optional, default: "README.md"). Supports alternate blueprint filenames
such as "EGM.md" when pre-existing human-maintained READMEs must not be
modified.git commit,
git add). All filesystem changes must be written locally using standard
file-writing tools. Tracking
and submitting is deferred to the human user.npx prettier --write) is explicitly configured in the
repository, it may optionally be invoked.package.json -> npm test (or pnpm test / yarn test)Cargo.toml -> cargo testgo.mod -> go test ./...pyproject.toml / pytest.ini / setup.py -> pytestMakefile -> make testBUILD / BUILD.bazel -> bazel test //...<test-command>VerificationCommand to populate generated README contracts.is_worker input parameter.is_worker is true, jump directly to Step 4: Sub-Orchestrator Worker
Flow to process the assigned sub_tree_root.is_worker is false or unset, proceed as the Root Orchestrator to
Step 2: Incremental Scoping & Safety Gate.Incremental BFS Discovery: Map the target path tree level-by-level
(BFS) using a directory queue, listing one directory level at a time. (CRITICAL: never run a recursive search such as find or ls -R.)
.git, .antigravity, node_modules,
venv, dist, build, third_party)..gitignore and .egmignore (if present) and ignore matching glob patterns.package.json, Cargo.toml,
go.mod, pyproject.toml, Makefile, BUILD) in the discovery map
to extract verification targets later.Safety Gate & Unbounded Spawning Approval (CRITICAL): During the BFS loop, if the total running count of discovered directories exceeds 15, immediately pause discovery and request user approval (using a structured question tool, if your harness has one, or plain chat) to warn the user and request approval for full-tree execution:
question: "The target directory tree contains more than 15
subdirectories. This is a large execution scope. Do you want to proceed
with full-tree bootstrapping?"options: ["Yes, proceed with full tree bootstrapping", "No, abort execution"]Bottom-up Post-Pruning Pass: Once mapping is complete (and approved), walk the mapped tree bottom-up (leaves to root). Filter out non-code and test-only directories:
.c, .cc, .cpp, .cxx, .h, .hh, .hpp,
.rs, .go, .zig, .lean.java, .kt, .scala, .cs, .fs.py, .rb, .php, .lua, .sh, .bash.ts, .tsx, .js, .jsx, .mjs, .cjs, .swift,
.m, .dart.sql, .proto, .graphql, .gql,
.thrift, .prisma.tf, .hcl, .cue
(Excludes build manifests, lockfiles, test fixtures, documentation, and
generic data dumps like .csv, .tsv, .parquet).tests, testing, testdata, or containing only
files matching *_test.*, *Test.*, test_*.*, or *.spec.*).Calculate the total count of pruned directories and maximum depth. Proceed to Step 3: Execution Strategy Selection.
Direct Execution Strategy (Directory Count <= 5):
path), and then proceed to
Step 5: Root Compilation & Termination.Unbounded Parallel Subagent Swarm Strategy (Directory Count > 5):
depth = 1.depth.depth is between 3 and 5: select these
nodes as subtree partition roots.depth < 3: increment depth (up to a max
of 3) and repeat step 2.depth > 5: group the largest branches (by
total nested folder count) into 3-4 separate partitions, combine the
remaining small branches into a single fallback partition subtree,
and select these as partition roots.depth reaches 3 and count is still < 3, select the
immediate children of the root (or fall back to sequential
execution).egm-bootstrap-orchestrator (agents/bootstrap_orchestrator.md) (or a general-purpose subagent)Prompt: "Run egm-bootstrap with path=[path],
is_worker=true, sub_tree_root=[partition_root],
target_filename=[target_filename]."Scout Registration: Use a read-only goldfish-explorer scout. Where your harness supports defining subagents at runtime, register it with:
name: goldfish-explorerdescription: Read-only codebase explorer scout.system_prompt: >- You are a read-only codebase explorer. Your task is
to analyze the source files in the target directory and return a
concise, factual summary. Do not write or modify any files. Return a
JSON object containing the directory's public symbols (interface),
invariants, and side effects matching schema: {"interface": [],
"invariants": [], "side_effects": []}. Never infer RPC methods,
routes, status enums, or invariants from file or directory names
alone; cite the exact [file:symbol_or_flag] for every entry, and
output ["None"] if no explicit invariants or side effects exist in
code.enable_write_tools: falseenable_subagent_tools: falsePost-Order Traversal: Walk the assigned sub_tree_root (or path) in
post-order (deepest leaves first). For each directory D:
Correction & Modification Policy: Check if target_filename (default:
README.md) already exists in D.
target_filename exists, do not overwrite it completely. Instead,
read its existing content.target_filename exists or not,
always scan the source code using the goldfish-explorer scout
for D to compile the true code symbol boundary.target_filename exists, call the
reasoning LLM with prompt: > "Analyze the following unstructured
documentation content. Extract all public symbol names, classes,
interfaces, invariants, and side effects. Format your response
strictly as a JSON object matching the following schema: {
"interface": string[], "invariants": string[], "side_effects":
string[] }." Merge these extracted symbols with the scout's code
symbols. Use your file-editing tool (or your file-writing tool) to correct
and update the existing contract file to be EGM compliant while preserving
developer notes and descriptions.Scout Spawning & Constraints: Spawn goldfish-explorer for D.
D is read in full. Bound each scout call to
about 1,500 lines of source instead: list top-level definitions
(class/func/def/route/flag lines) with your search tool, cut the
directory's files into chunks at those boundaries (never mid-body;
small files share a chunk), spawn one goldfish-explorer per
chunk in parallel, and merge their JSON. Give each chunk the
file's imports and top-level definition list so it can judge
visibility. Check build-manifest deps and import / #include
statements before attributing an RPC service, schema, or message
type to a local file. Read non-test files in this order:
.h, .hh, .hpp,
.proto, .graphql, .gql, .thrift, .prisma, .sql DDL,
interface classes); extract exact DDL table names and exported
build targets.main.*, index.*, lib.*, mod.*,
__init__.py, or files matching directory name), then
production source/query files alphabetically..css/.scss.*_test.*, *Test.*, test_*.*, *.spec.*):
ignore entirely, including in hybrid directories.["(Details pending/documentation failed)"], and continue execution.Parent Context Propagation: When processing a parent directory P,
retrieve the compiled interface summaries of its immediate child
subdirectories.
P's
explorer scout.Verification Command Target Lookup: Populate the Verification section
using the discovered VerificationCommand.
BUILD file exists
in D or the nearest ancestor, referencing bazel test / bazel build
with valid target patterns (//[package_path]/... or
//[package_path]:all, never //[package_path]... or
//[package_path]:...). Use bazel run for interactive runner
targets.package.json, Cargo.toml,
go.mod, pyproject.toml, Makefile), populate with the corresponding
test runner command.Directory Classification & Template Generation: Generate or correct
target_filename using your file-writing tool or your file-editing tool based on
D's classification.
D contains direct source code
files. Use the Component Package README Template. (If it also
has child subdirectories, include relative links to their contracts
in the Interface section).D contains no direct source code
files, but contains subdirectories with code contracts. Use the
Intermediate Blueprint README Template../child/${target_filename} or ../sibling/${target_filename}) for child
contracts and sibling file references within the same codebase
subsystem. (CRITICAL: Only generate [Child](./child/${target_filename})
links for child directories that exist in the pruned
subtree_index and contain an actual ${target_filename}. If a child
directory contains a SKILL.md or other non-contract asset, link
directly to ./child/SKILL.md or format it as an unlinked
bullet point. Never output speculative links to non-existent
contract files).Markdown Formatting: Immediately after writing or correcting
target_filename in D, ensure clean markdown formatting (valid headers,
tables, and code fences). If a project markdown formatter (e.g. npx prettier --write)
is configured in the repository, you may execute it on target_filename.
Worker Reporting: Once the assigned subtree is fully traversed, compile
the subtree_index array containing the path, summary, interface,
invariants, and side_effects for every processed directory.
If is_worker is true, read the Worker Return Interface Schema
relative to this skill directory, then return a matching JSON payload to
the Root Orchestrator and terminate. If
is_worker is false (sequential mode), proceed directly to Step 5: Root
Compilation & Termination.
Receive Worker Payloads: Collect the JSON subtree_index payloads
returned by all parallel Sub-Orchestrators.
[Subtree Root] (Documentation failed / Subagent execution timeout)) in the root
Blueprint's subdirectory index, and complete the remaining compilation.
(Worker failures leaving partial files are handled as an incremental
progress feature; the Correction Policy allows resuming on subsequent
runs).Intermediate Directory Documentation: Identify any intermediate
directories sitting between the root path and the partitioned subtree
roots.
Root Directory Documentation: The target root path of the execution is
always classified as the Repository Root (Blueprint / Hay).
target_filename already exists in path. If present, apply the
Correction & Modification Policy to read and retain the existing
title, metadata, and architectural overview at the top of the root
contract file.path itself contains any direct source files. If present,
spawn a goldfish-explorer scout for path to extract local symbols
and invariants, appending them under the optional ## Local Interface & Invariants section.target_filename using the Repository Root Blueprint
Template, rolling up all top-level subdirectory boundaries. Ensure any
root architecture or sequence diagrams strictly match the synchronous /
asynchronous boundaries, operation names, and storage backends in the
child subtree_index payloads without inventing unverified nodes.target_filename using your file-writing tool.Final Correctness Verification (CRITICAL): You MUST perform a final
verification pass across ALL created and modified contract files in the
subtree_index (including all child package contracts like pkg1/${target_filename}
and pkg2/${target_filename}) as a correctness check before concluding work. You
MUST explicitly read every single created or modified contract file
to verify its content. Do not skip any child contract files. Verify:
Interface, Invariants,
and Side Effects sections exist, cite real code symbols/flags/tables
from the scout extraction, and contain zero speculative or unverified
claims../subdir/${target_filename} or
./subdir/SKILL.md), and explicitly verify that every referenced target
file actually exists on the filesystem. Remove or correct any broken
relative references./... or
:all, never :...).Optional Drift Review (CRITICAL): After verification, ask the user (using a structured question tool, if your harness has one, or plain chat) to offer running a drift report on the generated documentation updates:
question: "Do you want to run the EGM Drift Report on the generated
contract updates to check for consistency with the codebase?"options: ["(Recommended) Yes, run drift report on modified contracts", "No, skip drift review"]egm-drift-report skill targeting
the modified contracts to verify both missing code coverage and
doc-to-code hallucinations (verifying every documented method, route,
enum, database table, and invariant against local source files and
recording discrepancies in the drift report for human triage). (Note:
While egm-drift-report is often used for design documents, it can be
applied to EGM-compliant contracts as a variant).Terminate execution successfully.
Before writing any contract file, read the README templates relative to this skill directory. It defines the Component Package (Peanuts), Repository Root (Blueprint / Hay), and Intermediate Blueprint README templates referenced above.
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
曖昧なアイデアを質問と多角的な検討で仮説やRFC要約に整理し、必要に応じて詳細設計へ引き継ぐスキルです。
要件や解決方針をまとめたブリーフやメモをもとに、概要から実装計画までを段階的に設計書へまとめ、各章を確認しながら仕上げるスキルです。
設計書やREADMEと現在のコードを照合し、仕様にない実装や未実装の機能、設計との差異を見つけて、文書ごとの報告書に整理します。
複数のレビュー担当から集めた文書の指摘を根拠に沿って分類し、修正案の提示や修正適用、利用者との確認を進めるスキルです。
設計文書を全体像・理解しやすさ・設計上の課題・実装準備の観点から段階的にレビューし、指摘をレポートにまとめるスキルです。
複数の専門エージェントで設計書や仕様書を繰り返しレビューし、指摘の整理、修正案の確認、承認された修正の反映まで進めるスキルです。