hns-lsel-curator
Local Self-Evolution Loop (LSEL) curator — the CLUSTER + drain engine for the GOOS-local PROPOSE→APPLY seam closure (SPEC-LSEL-LOCAL-EVOLUTION-001)…
от modu-ai★ 1 264 звезды на GitHub
Установить hns-lsel-curator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
hns-lsel-curator — LSEL CLUSTER + drain engine
Namespace:
hns-lsel-*is user-owned dogfood (CLAUDE.local.md §24). This skill is NOT mirrored intointernal/template/templates/— it lives only in this repo. Graduation tomoai-lsel-*+ 16-language distribution is a separate SPEC (out of scope per spec.md §G).M1 scope: drain + cluster + stage candidates. NO APPROVE, NO APPLY (M3). M2 scope: drain + cluster + PROPOSE shadow (no APPROVE, no APPLY). The PROPOSE stage emits shadow proposals + self-critiques; APPROVE/APPLY land in M3 via the fresh
hns-lsel-applierpath. M2 does NOT write tomemory/— the firstfeedback_*.mdtopic file is an M3+ deliverable after APPROVE.
What this skill does
The MoAI-ADK repo accumulates failure-event stubs in .moai/lessons-inbox.jsonl — a moving
target; the measured composition and its dated baseline live in the scope anchor document
(.moai/docs/learning-channel-scope.md), never in prose here. The constitution names the
orchestrator as the drain actor, but until this skill there was zero mechanical drain code —
the drain existed only as a doctrine paragraph (moai-constitution.md:147). This skill closes
that gap in user-owned surfaces, without touching the frozen Go applier
(internal/harness/applier.go:22 — its write-flag stays false; REQ-LSEL-003: bypass, never
unfreeze).
Channel scope (bounded claim): the inbox records failure-event stubs only — the two wired
families tool_failure:<tool>:<sig> and test_fail:<pkg>: (the test-fail family is wired via
the evidence writer's test-fail path; the writer itself is untouched here). It does not capture
defect families that produce neither a tool failure nor a test failure — those travel through
the human-mediated loop (lane discovery → lead judgment → auto-memory feedback_*.md +
MEMORY.md record), which is their learning channel. Numbers live only in the anchor document.
The drain is split into a mechanical core (drain.sh, deterministic, testable) and a
model-mediated layer (this SKILL.md + your judgment, invoked for M2+ importance refinement
and proposal drafting).
The mechanical core — drain.sh
drain.sh is a portable bash + jq script that lives next to this SKILL.md. It performs the
deterministic half of the drain:
drain.sh --inbox <path-to-lessons-inbox.jsonl> --state-dir <path-to-lsel-state>
Pipeline (REQ-LSEL-009 + AC-LSEL-009 / AC-LSEL-010):
- Companion offset — read
<state-dir>/drain-offset.json(seed{"offset":0}if absent). The inbox is append-only and is NEVER mutated; the offset marks consumed stubs (SPEC-HARNESS-RATCHET-REWIRE-001 D3 companion-offset pattern). - Slice — read stubs from the offset onwards (
tail -n +<offset+1>). - Drain-side severity filter (AC-LSEL-010) — discard noise BEFORE clustering:
tool_failure:Bash:UnknownFailure— the opaque ~65% timeout/sandbox bucket (the dominant noise share; report §2).tool_failure:Bash:SandboxViolation— environment constraint, not a code defect.- any
*:TimeoutError(Bash + MCP timeouts). The filter is drain-side becauseinternal/hook/failure_observer.go(the inbox writer) is OUTSIDE the six loop-writable surfaces (plan.md §F.1 [DECISION RESOLVED]), so the loop cannot edit the writer — it filters on read instead.
- Cluster by
event_keywith frequency count, first/last seen, and up to 3 sample summaries. - Singleton gate — discard clusters with
frequency < 2(single-occurrence noise per the constitution Lessons Protocol drain paragraph). - Importance — score each survivor with a Generative-Agents-style 1-10 gate:
importance = min(10, frequency)(frequency as proxy; the model augments this in M2+ with a severity hint and retrieval-weighted judgment). - Emit candidates to
<state-dir>/clusters.json; advance the companion offset.
clusters.json schema
{
"drained_at": "2026-08-04T08:41:00Z",
"offset_before": 0,
"offset_after": 624,
"total_read": 624,
"noise_discarded": 533,
"singletons_discarded": 4,
"candidates": [
{
"event_key": "tool_failure:Agent:UnknownFailure",
"frequency": 41,
"first_seen": "...",
"last_seen": "...",
"sample_summaries": ["...", "...", "..."],
"source": "tool:Agent",
"importance": 10
}
]
}
Empty-delta no-op
If the inbox has not grown past the offset, drain.sh writes an empty-candidate clusters.json
and leaves the offset unchanged. Not a failure (acceptance.md §E edge case).
The model-mediated layer (you, when invoked)
drain.sh produces the deterministic candidate set. When this skill is invoked for a real
curation pass (M2+), your job on top of the mechanical output is:
- Read
clusters.jsonand rank candidates byimportancethenfrequency. - Augment importance with a severity hint the mechanical core cannot see: a recurring
Bash:ExitError
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Grep - 03
Glob - 04
Bash
Вложенные файлы
- backlog_check.sh
- backlog_check_test.sh
- csa_refusal_test.sh
- drain.sh
- drain_test.sh
- propose_test.sh
- reflect.sh
- reflect_test.sh
- session_drain.sh
- session_drain_test.sh
- tier4_firing_test.sh
FAQ
Что делает скилл hns-lsel-curator?
Local Self-Evolution Loop (LSEL) curator — the CLUSTER + drain engine for the GOOS-local PROPOSE→APPLY seam closure (SPEC-LSEL-LOCAL-EVOLUTION-001). Companion-offset drain of .moai/lessons-inbox.jsonl with a drain-side severity filter that drops the ~65% Bash-timeout/sandbox noise, event_key clustering with a frequency gate, and a Generative-Agents-style 1-10 importance score. Candidates stage at .moai/state/lsel/clusters.json. M1 = drain only (NO PROPOSE, NO APPLY, NO memory/ writes).
Как установить скилл hns-lsel-curator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл hns-lsel-curator запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…