Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

スキルからのリレーションシップメモリの使用

ワークフロー、機能、スチュワードロールの関係を knowledge ツールでいつ、どのように取得するかをエージェントに伝えるスキルを作成する際に、このテンプレートを使用してください。これにより、グラフを内部機能だけでなく、オペレーター向けのワークフローとして維持できます。

relationship-memory スキル用のバンドルを作成し、次にスキルをスキャフォールドする:

sh

zeroclaw skills bundle add relationship-memory
zeroclaw skills add relationship-memory-capture \
  --bundle relationship-memory \
  --description "Capture and query durable workflow relationships with the knowledge graph" \
  --edit

skills add コマンドは、エディターで SKILL.md を開きます。生成されたファイルの内容を次のテンプレートに置き換えてください:

---
name: relationship-memory-capture
description: Capture and query durable workflow relationships with the knowledge graph
version: 0.1.0
author: zeroclaw_operator
tags: [knowledge, memory, relationships]
---

# Relationship memory capture

Use this skill when the operator asks to remember or inspect how workflows, skills, capabilities, decisions, lessons, or steward roles connect to each other.

Before writing graph memory:

1. Confirm the deployment has `[knowledge] enabled = true`.
2. Ask what relationship should be remembered and why it should be durable.
3. Ask whether the entry may include private workspace, account, client, or contact context.
4. Refuse to store secrets, tokens, personal email addresses, phone numbers, private URLs, account IDs, session IDs, or credential-like values.

Capture durable things as graph nodes with the `knowledge` tool:

- Use `pattern` for reusable workflows, practices, or skill-shaped procedures.
- Use `technology` for tools, protocols, providers, or capability surfaces.
- Use `expert` for steward roles, maintainer roles, or agent roles. Prefer role labels over real names.
- Use `decision` for design choices, policy calls, or accepted direction.
- Use `lesson` for something learned from an incident, review, or run.

Relate nodes after capture:

- Use `uses` from a workflow or skill to a capability it depends on.
- Use `authored_by` from a workflow or skill to the role that maintains it.
- Use `applies_to` from a lesson, decision, or pattern to the project or capability it affects.

When the operator asks what is connected to a workflow, capability, decision, lesson, or steward role, call `graph_neighbors`.

Keep entries short and factual. If a relationship is uncertain, capture the uncertainty in the content field or ask before writing it.

スキルをエージェントで利用できるようにするには、relationship-memory バンドルをそのエージェントにアタッチします。たとえば、設定内の agents.<alias>.skill_bundles にバンドルのエイリアスを追加するか、ダッシュボードの設定エディターを使用します。

ワークフローの依存関係をキャプチャする

これらの例は、モデルに提示される knowledge ツールの引数を示しています。これらは CLI サブコマンドではありません。

ワークフローをキャプチャ:

{
  "action": キャプチャ,
  node_type: パターン,
  title: リリースチェックワークフロー,
  "内容": リリースのサインオフ前に、バージョンノート、検証エビデンス、チェンジログのカバレッジ、およびロールバックノートを確認します。,
  タグ: [スキル, release]
}

それが使用するケーパビリティをキャプチャ:

{
  "action": キャプチャ,
  node_type: 技術,
  title: ドキュメント検証機能,
  "内容": mdBookのソース変更に対してドキュメント品質と変更リンクの検証を実行します。,
  タグ: [機能, docs]
}

ワークフローを機能に関連付けます:

{
  "action": 関連付ける,
  from_id: <release-check-workflow-node-id>,
  to_id: <docs-validation-capability-node-id>,
  関係: uses
}

スチュワードロールをキャプチャし、ワークフローに関連付ける:

{
  "action": キャプチャ,
  node_type: エキスパート,
  title: release-steward ロール,
  "内容": リリースレディネスチェックを維持し、エビデンスが十分であるかを判断するロール。,
  タグ: [ロール, release]
}
{
  "action": 関連付ける,
  from_id: <release-check-workflow-node-id>,
  to_id: <release-steward-role-node-id>,
  関係: authored_by
}

次にワークフローを確認します。

{
  "action": graph_neighbors,
  node_id: <release-check-workflow-node-id>,
  limit: 10
}

プロジェクトの関係

同じスキルパターンでプロジェクトやクライアントの関係も扱えますが、それは明示的な拡張として扱ってください。clientcontactinteraction ノードのガイダンスは、オペレーターがプロジェクトの関係追跡を望み、かつそのデータに対するプライバシーポリシーがある場合にのみ追加してください。relationship memory ページには、その形態向けの client_network および interaction_log アクションが示されています。

インストールされたスキルを検証する

保存後にスキルディレクトリを監査します。デフォルトのインストールルートでは、スキャフォールドされたバンドルスキルは ~/.zeroclaw/shared/skills/<bundle>/<skill>/ 配下にあります:

sh

zeroclaw skills audit ~/.zeroclaw/shared/skills/relationship-memory/relationship-memory-capture

インストールルートが ~/.zeroclaw でない場合は、zeroclaw skills add が出力するパスを確認してください。

skills audit はスキルパッケージの構造をチェックします。これは、デプロイで knowledge ツールが有効になっていることや、グラフに有用なデータが含まれていることを証明するものではありません。それを確認するには、プレースホルダーデータを使った小規模な手動セッションを実行し、エージェントがワークフロー/機能のペアに対して capturerelategraph_neighbors を呼び出せることを確認してください。プロジェクト向けにテンプレートを拡張する場合は、client_networkinteraction_log が想定どおりのプレースホルダーエントリを返すことも確認してください。

関連項目も参照してください