Hns Lsel Applierのロゴ

Hns Lsel Applier

組織人気
modu-ai
hns-lsel-applier

ローカル自己進化ループ(LSEL)のAPPLYエンジンです。承認済みのdecision.jsonレコードのみを再生するコンシューマーで、GOOSローカルのPROPOSE→APPLY接続を完了するために`.moai/hooks/lsel-apply.sh`を実行します(SPEC-LSEL-LOCAL-EVOLUTION-001 M3)。承認済みのdecision.jsonを読み込み、対象が凍結された許可リスト(.claude/lsel/frozen-allowlist.json)に含まれていることを検証します。同期承認マーカーのないexecution-meta対象に対しては、機械的に実行を拒否します。参照先のdiff.patchを適用し、apply-ledger.jsonlに行を追記して、機能ブランチにlsel-<proposal-id>タグ付きのConventional Commitを1件作成します。M3の範囲は、APPLYのバイパス経路を閉じることのみです(凍結されたGoアプライヤーは変更せず、凍結したままです。internal/harness/applier.go:22の書き込みフラグはfalseのままです。REQ-LSEL-003)。

Add to TypingMind

概要

公開者modu-ai
リポジトリmoai-adk
スキル名hns-lsel-applier
スター
1.2K
フォーク
226
同梱ファイル
4
ライセンスApache-2.0
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 4個の同梱ファイル

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/modu-ai/moai-adk.git /tmp/moai-adk
mkdir -p .claude/skills
cp -r /tmp/moai-adk/.claude/skills/hns-lsel-applier .claude/skills/hns-lsel-applier
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

関連するリクエストがあるとすぐに、モデルが自動的にHns Lsel Applierを読み込みます。

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

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

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

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

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

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

スキルの指示

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

hns-lsel-applier — LSEL APPLY engine

Namespace: hns-lsel-* is user-owned dogfood (CLAUDE.local.md §24). This skill is NOT mirrored into internal/template/templates/ — it lives only in this repo. Graduation to moai-lsel-* + 16-language distribution is a separate SPEC (out of scope per spec.md §G).

Token discipline. This body deliberately avoids the literal identifier of the frozen Go applier's write-flag and the literal name of the orchestrator-only user-question channel. Both are referenced by location and role (e.g. "the write-flag at internal/harness/applier.go:22", "the orchestrator's synchronous user gate") so the REQ-LSEL-003 invariant-grep and the E4 subagent-boundary grep over LSEL surfaces read zero literal matches. The invariants themselves are stated in plain English.

What this skill does

The LSEL loop's PROPOSE→APPLY seam was dead in production: Applier.Apply never ran (manifest.jsonl absent), CuratorDispatch had 0 production callers, and the frozen Go applier's write-flag at internal/harness/applier.go:22 (kept false) is the apply dead-switch (REQ-LSEL-003 — M3 keeps it false by BYPASS, never unfreeze). The M3 closure routes APPLY through a parallel user-owned applier that writes only to the six evolvable surfaces (spec.md §B.3), while the frozen Go applier stays byte-for-byte frozen. Design SSOT: .moai/reports/moai-local-self-evolution-design-20260804.html §4 ("동결된 Go applier를 우회하는 병렬 사용자 소유 applier를 세운다" — build a parallel user-owned applier that bypasses the frozen Go one) + §7 (the two-round critique moved the allowlist OUT of the evolvable skill files into a frozen meta file, and added execution-meta files to the forced-gate set).

The APPLY engine is the playback hook .moai/hooks/lsel-apply.sh plus this skill's model-mediated judgment (target validation nuance, approval-marker provenance, blast- radius reasoning the mechanical hook cannot see). The hook is the load-bearing safety floor; this skill is the consumer-facing surface that decides WHICH approved decision to feed it next and how to interpret refusal.

The APPLY pipeline

lsel-apply.sh <decision.json> performs five steps. Steps 1-2 are the safety floor; steps 3-5 are the playback.

  1. Frozen-allowlist hard-reject (REQ-LSEL-001 / AC-LSEL-001). The target path in decision.json is matched against the frozen_patterns regex list in .claude/lsel/frozen-allowlist.json. A match → REFUSE: a row is appended to .moai/logs/lsel-reject.log naming the rejected path and category frozen-path, NO file is written, and the hook exits 2.
  2. Execution-meta forced-gate (REQ-LSEL-002 / AC-LSEL-005 D3 self-amending- handcuffs). If the target matches one of the four execution_meta categories — (i) the frozen allowlist meta file itself, (ii) an applier/curator skill body (hns-lsel-applier/, hns-lsel-curator/), (iii) the apply hook (.moai/hooks/lsel-*.sh), (iv) the settings.local.json hook-registration subblock — the hook checks decision.json for a synchronous-approval marker (a synchronous_approval object with decision: "approved", produced by the orchestrator's synchronous user gate). No marker → REFUSE: reject-log row with category execution-meta, exit 3, no write. With marker → proceeds (the refusal is keyed on the absent marker, NOT on the category match alone). The refusal semantics mirror the M2 csa_refusal_test.sh fixture exactly.
  3. Apply the diff.patch via git apply (playback of an already-approved decision). Only the paths declared in the patch are staged — never git add -A (working-tree hygiene).
  4. Append the apply-ledger row to .moai/state/lsel/apply-ledger.jsonl: {proposal_id, target_surface, ts, result:"applied", commit_sha, category}. This is the manifest the frozen Go applier never produced, finally real in user-owned space.
  5. Commit the staged change as ONE feat(lsel-<proposal-id>): ... Conventional Commit on the current (feature) branch (REQ-LSEL-004). The ledger row's commit_sha is backfilled from the commit's short SHA.

A no-arg invocation is a clean no-op (exit 0) so an empty approved-queue does not derail a loop pass.

The model-mediated layer (you, when invoked)

When this skill is invoked to drive an APPLY pass, your job on top of the mechanical hook is:

  • Read the proposal's proposal.md + self-critique.md at .moai/state/lsel/proposals/<id>/. A proposal with status: blocked (any UNRESOLVED self-critique objection) MUST NOT be fed to the hook — return a blocker report instead.
  • Confirm the approval marker's provenance. The synchronous_approval object must carry a real orchestrator-produced approval artifact (the synchronous user-question channel the orchestrator owns per askuser-protocol.md). A marker the loop fabricated for itself is the self-amending-handcuffs failure mode (REQ-LSEL-002); the hook's mechanical check is the floor, your provenance judgment is the ceiling. This skill is a subagent mechanism and NEVER invokes the orchestrator-only user-question channel; return a blocker report and let the orchestrator run the gate.
  • Re-verify the frozen-allowlist invariant by grepping the write-flag at internal/harness/applier.go:22 — it MUST stay false. If M3's bypass ever drifts toward unfreezing the Go applier, return a blocker (AP-LSEL-002).

What this skill does NOT do

  • No unfreezing of the Go applier — the write-flag at internal/harness/applier.go:22 stays false (REQ-LSEL-003). The bypass is parallel and user-owned; the frozen applier is reference-only.
  • No edits to frozen doctrine — internal/template/templates/**, .claude/rules/moai/**, AGENTS.md, retained agents, moai-* skills, the frozen Go applier / curator_dispatch.go, and .moai/config/sections/** are byte-for-byte untouched. The allowlist hard-rejects them (step 1).
  • No new-apply / self-approve / allowlist-amend primitive in lsel-apply.sh (REQ-LSEL-008). The hook only consumes already-approved decisions; it does not author proposals or bless them. The M4 verify.sh runs only AFTER an apply has committed — it does not create a new apply; it never self-approves.
  • No user-question invocation — subagent boundary (askuser-protocol.md). Return a blocker report; the orchestrator runs the synchronous gate.

VERIFY stage (M4 — REQ-LSEL-013 / AC-LSEL-015)

After an apply commits a proposal, VERIFY proves the apply was safe. VERIFY has two layers — both MANDATORY:

(a) Mechanical layer — verify.sh (bash-testable)

verify.sh --proposal-dir <p> --repo-root <r> [--timeout SECS] [--feedback-file <f>] runs the proposal's frontmatter verify_command with a timeout-retry-once policy and auto-reverts on a second failure:

  • 2-attempt policy. Attempt 1 runs. On SUCCESS → verified:true, stop. On TIMEOUT-class failure → attempt 2 (flaky tolerance — report §10 P3: "retry once on timeout so a correct proposal isn't flipped by noise"). On NON-TIMEOUT-FAIL → attempt 2 (allows the "second non-timeout failure" of AC-LSEL-015 clause 3 to materialize before revert fires).
  • Attempt 2: SUCCESS → verified:true. Any failure (timeout OR non-timeout) → verified:false + auto git revert lsel-<proposal-id> + the proposal's feedback_*.md is marked verified: false.
  • The outcome is appended to the apply ledger as a {"stage":"verify","verified":true|false,...} row — the load-bearing signal.

(b) MANDATORY /moai gate superset (model-mediated)

/moai gate (lint+format+type+test) is MANDATORY after every apply — it is NOT optional. A bash hook cannot invoke a Claude Code slash command directly, so the gate runs MODEL-SIDE: when this skill drives an APPLY pass, the orchestrator/model runs /moai gate after the mechanical apply + verify. The proposer-authored verify_command alone is circular (report §11 mustFix B#6 / AP-LSEL-004): a proposer can author a verify_command that its own change satisfies. /moai gate is the independent check — lint, format, type-check, and the test suite exercise surfaces the proposal never touched. Treat a mechanical verify_command PASS without a green /moai gate as an unverified apply.

Model-mediated layer (you, when invoked)

  • After lsel-apply.sh commits and verify.sh reports, run /moai gate (the MANDATORY superset). If the gate fails, the apply is unverified even if verify.sh reported verified:true — treat it as a VERIFY failure and revert.
  • A revert (whether auto-fired by verify.sh or gate-driven) MUST be surfaced to the orchestrator as a blocker report — the orchestrator, not this skill, confirms a revert with the user. Never run /moai gate's user-facing surface from inside this subagent mechanism; return a blocker report.

Verification (run before declaring an APPLY+VERIFY pass complete)

bash
# M4 VERIFY characterization test (AC-LSEL-015) — hermetic temp repo:
.claude/skills/hns-lsel-applier/verify_test.sh

# the verify ledger row carries the outcome:
grep '"stage":"verify"' .moai/state/lsel/apply-ledger.jsonl

Verification (run before declaring an APPLY pass complete)

bash
# 1. APPLY characterization test (AC-001/002/005/008/013) — hermetic temp repo:
.claude/skills/hns-lsel-applier/apply_test.sh

# 2. Rollback-rehearsal SHIP GATE (AC-014):
.claude/skills/hns-lsel-applier/rollback_rehearsal_test.sh

# 3. REQ-LSEL-003 frozen-flag re-verify (post-apply). The frozen Go applier's
#    write-flag at internal/harness/applier.go:22 MUST read `false`, and no LSEL
#    surface (skills/hooks/state/allowlist) references that identifier as mutable.
#    (The literal identifier is intentionally not written here; find it at line 22
#    of the frozen file and grep LSEL surfaces for it — expect zero hits.)
sed -n '22p' internal/harness/applier.go   # MUST show the `= false` write-flag line

# 4. The apply ledger carries the new row:
tail -1 .moai/state/lsel/apply-ledger.jsonl

Cross-references

  • SPEC: .moai/specs/SPEC-LSEL-LOCAL-EVOLUTION-001/{spec,plan,acceptance,progress}.md
  • Design report (SSOT): .moai/reports/moai-local-self-evolution-design-20260804.html §4 (user-owned parallel applier), §7 (allowlist relocation + execution-meta forced gate), §10 P3, §11 mustFix A#1/A#5/A#8.
  • Frozen applier (reference only): internal/harness/applier.go:22 (the frozen write-flag), internal/harness/curator_dispatch.go.
  • Curator (PROPOSE stage, M2): .claude/skills/hns-lsel-curator/SKILL.md (CSA forced-gate doctrine + the Tier-4 DEAD finding).
  • CSA refusal fixture: .claude/skills/hns-lsel-curator/csa_refusal_test.sh (the refusal rule this hook enforces mechanically).
  • Namespace guard: internal/template/split_namespace_test.go, internal/template/internal_content_leak_test.go (must NOT flag a hns-lsel-applier leak — this skill is dogfood, never templated).

同梱ファイル

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

よくある質問

AIスキル「Hns Lsel Applier」では何ができますか?

ローカル自己進化ループ(LSEL)のAPPLYエンジンです。承認済みのdecision.jsonレコードのみを再生するコンシューマーで、GOOSローカルのPROPOSE→APPLY接続を完了するために`.moai/hooks/lsel-apply.sh`を実行します(SPEC-LSEL-LOCAL-EVOLUTION-001 M3)。承認済みのdecision.jsonを読み込み、対象が凍結された許可リスト(.claude/lsel/frozen-allowlist.json)に含まれていることを検証します。同期承認マーカーのないexecution-meta対象に対しては、機械的に実行を拒否します。参照先のdiff.patchを適用し、apply-ledger.jsonlに行を追記して、機能ブランチにlsel-<proposal-id>タグ付きのConventional Commitを1件作成します。M3の範囲は、APPLYのバイパス経路を閉じることのみです(凍結されたGoアプライヤーは変更せず、凍結したままです。internal/harness/applier.go:22の書き込みフラグはfalseのままです。REQ-LSEL-003)。

TypingMindでHns Lsel Applierを使うメリットは何ですか?

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

TypingMindにHns Lsel Applierをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/hns-lsel-applierを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Hns Lsel Applierを使えるAIモデルはどれですか?

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

Hns Lsel Applierで使えるAIモデルの数に制限はありますか?

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

AIスキル「Hns Lsel Applier」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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