Ring:Migrating To Lib Systemplaneのロゴ

Ring:Migrating To Lib Systemplane

組織
LerianStudio
ring:migrating-to-lib-systemplane

Migrating Lerian Go services from .env/YAML operational knobs (log levels, feature flags, rate limits, timeouts) to the lib-systemplane hot-reloadable runtime config client, wiring the migration-only make systemplane-ddl pipeline (runtime DDL forbidden in v1.6.0+). Orchestrates an 11-gate cycle dispatching ring:backend-go. Use when adding hot-reloadable config or migrating off v4 systemplane. Skip for non-Go or static-only config.

概要

公開者LerianStudio
リポジトリring
スキル名ring:migrating-to-lib-systemplane
スター
215
フォーク
28
同梱ファイル
指示のみ
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    LerianStudioがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Ring:Migrating To Lib Systemplane」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/LerianStudio/ring/tree/main/dev-team/skills/migrating-to-lib-systemplane
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LerianStudio/ring.git /tmp/ring
mkdir -p .claude/skills
cp -r /tmp/ring/dev-team/skills/migrating-to-lib-systemplane .claude/skills/lerianstudio-ring-migrating-to-lib-systemplane
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでRing:Migrating To Lib Systemplaneを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にRing:Migrating To Lib Systemplaneを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Ring:Migrating To Lib Systemplaneは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Systemplane Migration (lib-systemplane)

When to use

  • User requests systemplane integration for a Go service
  • User asks to add hot-reloadable runtime configuration
  • Task mentions "systemplane", "runtime config", "hot reload", "LISTEN/NOTIFY config", "admin.Mount"
  • User asks to migrate from v4 systemplane to v5

Skip when

  • Service is not a Go project
  • Task does not involve runtime configuration
  • Service has zero hot-reloadable knobs (everything is static env-var-at-startup config)
  • Task is documentation-only or non-code

You orchestrate. Agents implement. NEVER use Edit/Write/Bash on Go source files. All code changes go through Task(subagent_type="ring:backend-go"). TDD mandatory for all implementation gates (RED → GREEN → REFACTOR).

Systemplane Architecture

Three-step lifecycle:

  1. systemplane.NewPostgres / systemplane.NewMongoDB — construct client (pass open *sql.DB or *mongo.Client)
  2. client.Register(namespace, key, defaultValue, opts...) — declare every key BEFORE Start
  3. client.Start(ctx) — begin listening; Get* for reads, OnChange for reactions

Standards reference: WebFetch https://raw.githubusercontent.com/LerianStudio/lib-systemplane/main/doc.go

Canonical import paths:

AliasImport PathPurpose
systemplanegithub.com/LerianStudio/lib-systemplaneClient, constructors, options, SchemaSQL() / DefaultSeedSQL() provisioning artifacts
admingithub.com/LerianStudio/lib-systemplane/adminHTTP admin routes
systemplanetestgithub.com/LerianStudio/lib-systemplane/systemplanetestContract test suite

Legacy paths are DELETED — do not use lib-commons/v4/... or lib-commons/v5/commons/systemplane (extracted to its own module), and do not use Supervisor, BundleFactory, ApplyBehavior.

Provisioning is migration-only. lib-systemplane publishes systemplane.SchemaSQL() + systemplane.DefaultSeedSQL() as public artifacts and consumers MUST fold them into the service's own SQL migration pipeline via the make systemplane-ddl generator pattern (Gate 3.5). Runtime DDL provisioning is FORBIDDEN — least-privilege tenant-manager roles cannot run DDL anyway, and any boot-time runSchema-style hook is a CRITICAL deviation.

Scope: operational knobs only — values that can mutate in-place (log levels, feature flags, rate limits, timeouts, poll intervals). NOT for settings requiring resource teardown: DSNs, TLS material, listen addresses → keep in env vars + restart.

Redaction policies for Register:

PolicyAdmin GET returnsUse for
RedactNone (default)Raw valueLog levels, feature flags, non-sensitive
RedactMaskType-aware maskLow-sensitivity values
RedactFullnull/omittedSecrets, tokens, API keys

Any key storing credentials MUST use RedactFull.

Admin mount requires custom authorizer (admin.WithAuthorizer) — default is DENY-ALL.

Mandatory agent instruction (include in EVERY dispatch):

WebFetch https://raw.githubusercontent.com/LerianStudio/lib-systemplane/main/doc.go. Use only canonical github.com/LerianStudio/lib-systemplane import paths. v4 packages and the legacy lib-commons/v5/commons/systemplane path no longer exist. systemplane is for operational knobs only — not DSNs, TLS, or listen addresses. Provisioning is migration-only (Gate 3.5). Wire cmd/generate-systemplane-ddl/ + make systemplane-ddl + check-systemplane-ddl-drift + migrations/systemplane_ddl_manifest.json and a bootstrap seam returning []SystemplaneSeedEntry. NEVER call SchemaSQL() at boot. NEVER hand-edit generated migrations/NNN_systemplane_*.sql. See multi-tenant.md §27 "Cold-tenant resolution" for the canonical reference. TDD: RED → GREEN → REFACTOR for every gate.

Related Skills

  • [[using-lib-systemplane]] — adoption sweep + API reference for the lib-systemplane module
  • [[using-lib-commons]] — non-observability lib-commons packages (lifecycle, outbox, tenancy)
  • [[using-lib-observability]] — tracing, metrics, logging, assert, runtime, redaction
  • For services running in multi-tenant mode (MULTI_TENANT_ENABLED=true), the consumer-side pattern (registration shape, no-fallback consumer reads, DI interface, make systemplane-ddl provisioning generator, Manager binding when available in the pinned lib version) is documented in dev-team/docs/standards/golang/multi-tenant.md §27 "Systemplane in MT mode — compliance pattern (MANDATORY)". Load that section — particularly the "Cold-tenant resolution — make systemplane-ddl generator" subsection — in addition to the general systemplane architecture below.

Gate Overview

GateNameConditionAgent
0Stack Detection + Compliance AuditAlwaysOrchestrator
1Codebase Analysis (config focus)Alwaysring:codebase-explorer
1.5Implementation PreviewAlwaysring:visualizing
2lib-commons v5 Upgrade + v4 RemovalSkip only if v5 in go.mod AND zero v4 importsring:backend-go
3Client Construction + Key RegistrationAlwaysring:backend-go
3.5DDL Provisioning (make systemplane-ddl)Always — STANDARD provisioning mechanismring:backend-go
4OnChange SubscriptionsAlways unless zero hot-reloadable keys (justify)ring:backend-go
5Config BridgeSkip if no Config struct reads need live valuesring:backend-go
6Admin HTTP Mount + AuthorizerSkip only if service has no admin surface (justify)ring:backend-go
7Wiring + Lifecycle + Backward CompatAlways — NEVER skippablering:backend-go
8TestsAlwaysring:backend-go
9Code ReviewAlways9 defaults + triggered specialists in parallel
10User ValidationAlwaysUser
11Activation GuideAlwaysOrchestrator

Gates execute sequentially. Any existing v4 code = NON-COMPLIANT = gates cannot be skipped.

Gate 0: Stack Detection

Orchestrator executes directly. Three phases:

Phase 1: Stack Detection

bash
grep "lib-commons\|lib-systemplane" go.mod  # check legacy v4/v5 paths vs new module
grep -rn "systemplane" internal/             # existing usage
grep -rn "SYSTEMPLANE_" .                    # v4 env vars
grep "postgresql\|postgres" go.mod           # backend type
grep "mongodb\|mongo" go.mod
# Non-canonical:
grep -rn "fsnotify\|viper.Watch\|Supervisor\|BundleFactory\|ApplyBehavior" internal/
grep -rn "lib-commons/v5/commons/systemplane\|lib-commons/v4" internal/  # legacy paths
# DDL provisioning seam + manifest (Gate 3.5):
ls cmd/generate-systemplane-ddl/                              # generator presence
ls migrations/systemplane_ddl_manifest.json                    # append-only manifest
grep -n "systemplane-ddl\|check-systemplane-ddl-drift" Makefile  # make targets
grep -rn "SystemplaneSeedEntries\|buildSystemplaneRegistrations" internal/bootstrap/  # seam
# Runtime DDL anti-pattern (CRITICAL):
grep -rn "runSchema\|SchemaSQL()\|CREATE TABLE.*systemplane_entries" internal/  # MUST be migration-only

Phase 2: Compliance Audit (if systemplane code detected)

  • No legacy imports (lib-commons/v4/..., lib-commons/v5/commons/systemplane)
  • Register called before Start
  • OnChange wired for hot-reloadable keys
  • admin.Mount with admin.WithAuthorizer
  • Lifecycle: client.Start(ctx) registered with commons.Launcher
  • cmd/generate-systemplane-ddl/ generator present AND migrations/systemplane_ddl_manifest.json committed
  • make systemplane-ddl + check-systemplane-ddl-drift wired in Makefile and called from check-generated-artifacts
  • Bootstrap exposes the seam SystemplaneSeedEntries() ([]SystemplaneSeedEntry, error) derived from the same buildSystemplaneRegistrations (or equivalent) the client uses at boot
  • ZERO runtime DDL — no runSchema, no SchemaSQL() at boot, no CREATE TABLE ... systemplane_entries outside migrations/

Phase 3: Non-Canonical Detection

  • Any fsnotify / viper.WatchConfig / envconfig.Watch for runtime config → MUST replace
  • Any v4 sub-packages (domain/, ports/, registry/, service/, bootstrap/) → MUST remove
  • Any lib-commons/v5/commons/systemplane imports → MUST migrate to lib-systemplane
  • Runtime DDL provisioning (boot-time SchemaSQL() execution) → MUST replace with the make systemplane-ddl migration pipeline (Gate 3.5)
  • Hand-written migrations/NNN_systemplane_*.sql files NOT emitted by the generator → MUST be re-emitted via make systemplane-ddl (drift-guarded)

Severity Reference

SeverityCriteria
CRITICALLegacy import (lib-commons/v4/... or lib-commons/v5/commons/systemplane); admin.Mount without authorizer; secret with RedactNone; runtime DDL provisioning (boot-time SchemaSQL() or CREATE TABLE systemplane_entries outside migrations/)
HIGHNo Register before Start; no OnChange for live key; SYSTEMPLANE_* env vars in code; missing cmd/generate-systemplane-ddl/ generator or systemplane_ddl_manifest.json; make systemplane-ddl not wired into check-generated-artifacts
MEDIUMMissing WithLogger/WithTelemetry; no validator on numeric range; hand-edited generated migrations/NNN_systemplane_*.sql (would fail the drift guard)
LOWMissing WithDescription; inconsistent namespace naming

よくある質問

AIスキル「Ring:Migrating To Lib Systemplane」では何ができますか?

Migrating Lerian Go services from .env/YAML operational knobs (log levels, feature flags, rate limits, timeouts) to the lib-systemplane hot-reloadable runtime config client, wiring the migration-only make systemplane-ddl pipeline (runtime DDL forbidden in v1.6.0+). Orchestrates an 11-gate cycle dispatching ring:backend-go. Use when adding hot-reloadable config or migrating off v4 systemplane. Skip for non-Go or static-only config.

TypingMindでRing:Migrating To Lib Systemplaneを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Ring:Migrating To Lib Systemplaneはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにRing:Migrating To Lib Systemplaneをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/LerianStudio/ring/tree/main/dev-team/skills/migrating-to-lib-systemplaneを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Ring:Migrating To Lib Systemplaneを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Ring:Migrating To Lib Systemplaneで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもRing:Migrating To Lib Systemplaneを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Ring:Migrating To Lib Systemplane」は無料ですか?

はい。LerianStudioがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇