Configuration Drift Detection Across Environmentsのロゴ

Configuration Drift Detection Across Environments

コミュニティ
HimanshuJ16
configuration-drift-detection-across-environments

注文を送信できる環境で設定ツリーを有効にする前に、承認済みのベースラインと一致していることを確認します。キーの欠落、値の変更、デバッグセッションから引き継がれた型の意図しない変更を検出します。

概要

公開者HimanshuJ16
リポジトリAlgo-Trading-Skills
スキル名configuration-drift-detection-across-environments
スター
50
フォーク
7
同梱ファイル
5
ライセンスApache-2.0
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 5個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

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

インストール

AIスキル「Configuration Drift Detection Across Environments」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HimanshuJ16/Algo-Trading-Skills.git /tmp/Algo-Trading-Skills
mkdir -p .claude/skills
cp -r /tmp/Algo-Trading-Skills/skills/configuration-drift-detection-across-environments .claude/skills/configuration-drift-detection-across-environments
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

関連するリクエストがあるとすぐに、モデルが自動的にConfiguration Drift Detection Across Environmentsを読み込みます。

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

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

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

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

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

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

スキルの指示

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

When to Use

Invoke this skill when a configuration tree is about to take effect in an environment that can send orders, and you need positive evidence that it matches the baseline someone actually approved. The failure it prevents is specific: a risk parameter edited in staging for a debugging session and carried into production, a broker_endpoint still pointing at sandbox after a promotion, a max_order_usd that arrived as the string "100000" and silently disabled a numeric comparison downstream.

Use it in two places, not one: as a CI/CD gate before an artifact is promoted, and again during process initialization before the trading socket opens. The first catches the mistake earlier; the second is the one that actually protects live capital, because it runs on the host and against the file the engine will really read.

When NOT to Use

Do not use it when:

  • The two environments are supposed to differ structurally. This detector compares one tree against one baseline. A research sandbox with a different schema entirely will produce noise, not signal — see research-environment-vs-production-environment-parity for that comparison.
  • You need to know what changed over time in one environment. This is a two-way comparison at a point in time, not a change log. Use audit-logging-for-configuration-changes for the who/when/why record.
  • You have not decided which config is authoritative. If two candidate baselines exist, the audit result is arbitrary. Designate the Golden Source first (reference-data-golden-source-designation).
  • What you actually need is approval workflow. Detecting that a risk limit drifted is not the same as governing who may change it; see risk-control-configuration-change-approval-workflow.
  • The value you care about is not in the config file. A limit injected at runtime by a feature-flag service or mutated by an operator after startup is invisible to this audit, which compares configuration to configuration.

Prerequisites

  • A single designated Golden Source configuration tree, version-controlled, loaded as a dict.
  • The target environment configuration, loaded from the same source the trading process will actually read — not a copy prepared for the audit.
  • An explicit override policy, split two ways:
    • allowed_overrides — connectivity, naming and logging keys that legitimately differ (env_name, api_url, broker_endpoint, log_level, port, host, db_name). Pass an empty set for zero-tolerance auditing.
    • protected_keys — risk-control parameters that may never be whitelisted. The built-in DEFAULT_PROTECTED_KEYS is a starting point keyed on leaf name; extend it with the risk parameters your own schema uses.
  • A caller that treats is_compliant is False as a hard stop, with the authority to fail the pipeline or abort startup.

Workflow

  1. Ingest both trees. Load golden_baseline and target_config as dicts. Non-dict input raises TypeError rather than being audited partially.
  2. Flatten to dot-separated paths. Nested dicts collapse to system.api_url. Two distinct keys that flatten to the same path (a literal "a.b" alongside a nested {"a": {"b": ...}}) raise ValueError — one branch would otherwise be dropped from the audit and real drift could surface as a PASS. An empty nested dict is kept as a leaf so a whole missing section is still reported.
  3. Classify every key in the union of both trees:
    • Key in baseline, missing from target → CRITICAL. This holds even for whitelisted keys: an override may change a value, not delete a setting the engine expects to read.
    • Value or type differs on a protected key → CRITICAL, regardless of the whitelist.
    • Value or type differs on a whitelisted, non-protected key → ALLOWED.
    • Value or type differs otherwise → CRITICAL.
    • Key in target, absent from baseline → WARNING.
  4. Decide. critical_drift_count > 0 sets is_compliant = False. Block the promotion or abort initialization before the socket opens — do not connect first and alert afterwards. On a compliant report with warnings, proceed but route the WARNING items to human review.
  5. Record. Persist report.drift_items to the deployment audit log alongside the authorizing person. For firms in scope of MiFID II RTS 6 this record supports the Art. 5(7) and Art. 11 obligations — see references/standards.md for what those articles do and do not require.

Full procedure: see references/workflows.md. Standards reference: see references/standards.md. Printable pre-flight checklist: see assets/checklist.md.

Common Pitfalls

  • Whitelisting a risk parameter to silence a noisy alert. Adding max_position_size to allowed_overrides does not fix the drift; it disables the gate on exactly the value the gate exists to protect. The detector refuses this at construction time, but the same instinct reappears as "let me just widen protected_keys's exceptions" — resolve the drift instead.
  • Assuming an empty whitelist means strict. It does now, and that is a fix, not a given: this detector previously treated allowed_overrides=set() as falsy and substituted the permissive built-in default, turning the strictest possible request into the loosest available policy. If you have forked or reimplemented this pattern, check that line.
  • Reading a PASS as "the environments are identical." Extra keys in the target are WARNING and never block, because the baseline cannot know what a legitimately-added key means. A config with an unreviewed extra flag passes this audit.
  • Whitelisting by bare leaf name when you meant one section. api_url in allowed_overrides whitelists that name everywhere in the tree, including under a section you never intended to relax. Use the exact path system.api_url when the override should be scoped.
  • Ignoring type coercion drift. max_order_qty as the string "100" instead of the integer 100 compares as drift here precisely because it will not compare as a number downstream. Do not "fix" a type-mismatch alert by relaxing the comparison.
  • Post-startup auditing. Running the check after the trading engine is live reports a breach rather than preventing one.
  • Auditing a file the engine never opens. A pipeline that audits prod_baseline.json from the repo while the host loads a locally-templated config proves nothing about the host.

Verification

  • Instantiate ConfigurationDriftDetector with allowed_overrides={"api_url"}. Feed a Golden Source config and a target whose max_order_usd is 1,000,000 against a baseline of 100,000: the report must show CRITICAL severity, the description must name it as a protected risk-control parameter, and is_compliant must be False. Change only api_url instead: allowed_override_count must be 1 and is_compliant True.
  • Confirm the gate cannot be disabled: ConfigurationDriftDetector(allowed_overrides={"max_position_size"}) must raise ValueError.
  • Confirm zero tolerance is honoured: ConfigurationDriftDetector(allowed_overrides=set()) must flag a broker_endpoint change as CRITICAL, not ALLOWED.
  • Run python -m unittest discover -s skills/configuration-drift-detection-across-environments/scripts and confirm all 28 tests pass.

Related Skills

  • research-environment-vs-production-environment-parity
  • environment-parity-dev-staging-production
  • blue-green-deployment-for-live-strategy-updates
  • audit-logging-for-configuration-changes
  • risk-control-configuration-change-approval-workflow
  • reference-data-golden-source-designation

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Configuration Drift Detection Across Environments」では何ができますか?

注文を送信できる環境で設定ツリーを有効にする前に、承認済みのベースラインと一致していることを確認します。キーの欠落、値の変更、デバッグセッションから引き継がれた型の意図しない変更を検出します。

TypingMindでConfiguration Drift Detection Across Environmentsを使うメリットは何ですか?

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

TypingMindにConfiguration Drift Detection Across Environmentsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/configuration-drift-detection-across-environmentsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Configuration Drift Detection Across Environmentsを使えるAIモデルはどれですか?

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

Configuration Drift Detection Across Environmentsで使えるAIモデルの数に制限はありますか?

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

AIスキル「Configuration Drift Detection Across Environments」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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