SuperAPI AI Directory

knowledge-graph-init

Agents & models

View repository

Updated 10-15 22:15

About this skill

knowledge-graph-init

Following the operational rules in AGENTS.md, initially create the architecture knowledge graph in memory MCP (server-memory, storage location memory.jsonl).

Procedure

  1. Check existing: read_graph to check the existing graph. If entities already exist, do not overwrite them; only add what is missing (confirm with the user if necessary).
  2. Investigate: Read the codebase and identify modules from the following perspectives. Use a granularity that matches the project's structure.
    • The entire repository (one entity for a monorepo. Put the subdirectory structure in observations)
    • Units identifiable from build/package definitions (Xcode targets, npm workspaces, Gradle modules, etc. Put the frameworks used and external dependencies in observations)
    • Main modules in the source directories (common foundation, domain layer, feature units, etc., following the project's layer structure)
    • Entry points (main function, App struct, server startup script, etc.)
    • Infrastructure and operations (IaC, CI/CD, deployment configuration, release automation, etc.)
  3. Register: create_entities with the entity,create_relations to register the dependencies.
    • Examples of entityType: monorepo, build target, entry point, core module, feature, infra
    • Examples of relation: depends on, contains, injects, configures, deploys
    • In observations, include not only "what it does" but also structural caveats (exceptions in build settings, mechanisms for environment/mock switching, etc.) and the investigation date.
  4. Verify: read_graph to check the registration results, and cross-check against the code's directory listing to ensure no major modules are missing.
  5. Append operational rules: AGENTS.md(or CLAUDE.md) add the following section if it does not exist. If an equivalent rule already exists, do not add it redundantly.
## アーキテクチャ知識グラフ

モジュール構成・依存関係の知識グラフを memory MCP(server-memory、保存先 `memory.jsonl`)で管理している。

- 実装・調査の前に `search_nodes` や `open_nodes` で関係するモジュールの entities / relations を参照し、既存の構成・依存関係に沿って作業すること(全体像が必要なら `read_graph`)。
- モジュールの追加・削除や依存関係の変更を行ったら、`create_entities` / `create_relations` / `add_observations` 等でグラフも更新すること。

Notes

  • The graph is a place to record the "structure and dependencies" that can be derived from the code. Do not write task management or TODOs.
  • In subsequent implementation and investigation, refer to search_nodes / open_nodes first, and update the graph when modules are added or changed (see AGENTS.md).