Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

schema-mechanism

БесплатноБез исполняемых скриптовНе проверен

Drescher's computational theory of causal learning

SimHackerот SimHacker★ 63 звезды на GitHub19 установок в других каталогах

Об этом скилле

Schema Mechanism

"An agent learns by discovering reliable patterns: when I do X in context C, result R tends to follow."

Gary Drescher's Made-Up Minds (1991) provides a computational theory of how minds learn causal models of the world. Drescher was a student of Marvin Minsky at MIT, and his schema mechanism extends Piaget's developmental psychology into executable algorithms.

The Core Idea

A schema is a causal unit:

Context → Action → Result

The agent doesn't start with schemas. It discovers them through experience, noticing which actions reliably produce which results in which contexts.

schema:
  action: push-button
  context: [door-closed]
  result: [door-open]
  reliability: 0.95

Drescher schema vs interchange schema

Here schema means Drescher causal units (Context → Action → Result). That is not JSON Schema, OpenAPI, RELAX NG, XSD, or other interchange mechanisms. For the MOOLLM schemapedia (interchange, relational SQL/SQLite, frames, K-lines, SoM—same word, many senses), see schema (skills/schema/, schemas/registry.yml). For Minsky frames vs K-lines vs Drescher, see knowledge-frames.

Schema Components

Component Description MOOLLM Equivalent
Item Atomic state element (ON/OFF/UNKNOWN) YAML field, file existence
Action Something the agent can do Skill verb, procedure
Schema Context → Action → Result Documented procedure
Extended Context Statistical tracking of context conditions "Prerequisites" section
Extended Results Statistical tracking of result conditions "Side Effects" section
Synthetic Item Discovered hidden state Undocumented dependency
Composite Action Chained sequence of actions Multi-step procedure

Extended Context: Marginal Attribution

A schema might fail unpredictably. Extended Context tracks which conditions correlate with success:

# The schema "start pyvision" sometimes fails
# Extended Context discovers: it fails when postgres isn't running

schema:
  action: start-pyvision
  context: []  # Initially empty
  result: [pyvision-running]
  
extended_context:
  postgres-running:
    success_when_on: 47    # Succeeded 47 times when postgres was on
    success_when_off: 0    # Never succeeded when postgres was off
    failure_when_on: 2     # Failed 2 times even with postgres
    failure_when_off: 15   # Failed 15 times without postgres
    
# Discovery: postgres-running is a prerequisite!
# Spin off new schema with explicit context:
schema:
  action: start-pyvision
  context: [postgres-running]  # Now explicit
  result: [pyvision-running]

This is marginal attribution -- discovering which items matter by tracking correlations.


Extended Results: Side Effect Discovery

Similarly, schemas track what else happens:

schema:
  action: ingest-video
  context: [video-exists]
  result: [task-created]
  
extended_results:
  disk-space-decreased:
    on_after_success: 47
    off_after_success: 0
    # Discovery: ingesting uses disk space!

Side effects become explicit, documented, predictable.


Synthetic Items: Hidden State

Sometimes success depends on state the agent can't directly observe. Drescher's solution: invent a synthetic item as a hypothesis.

# The schema works sometimes, fails sometimes, no visible pattern
# Hypothesis: there's hidden state we can't see

synthetic_item:
  name: "gpu-memory-available"
  host_schema: start-pyvision
  # If this schema succeeds, assume the item was ON
  # If it fails, assume the item was OFF

The synthetic item becomes a probe -- its state is inferred from schema success/failure.


Composite Actions: Planning

Once the agent has reliable schemas, it can chain them:

# Goal: pyvision-running
# Current: postgres-not-running

plan:
  - schema: start-postgres
    context: []
    result: [postgres-running]
  - schema: start-pyvision
    context: [postgres-running]
    result: [pyvision-running]

Drescher uses Dijkstra's algorithm on the schema graph -- find shortest path from current state to goal state.


The Learning Loop

# Schema mechanism learning loop
learning_loop:
  - step: 1. ACT
    action: "Execute schema action"
  - step: 2. OBSERVE
    action: "Record which items changed (on-flips, off-flips)"
  - step: 3. ATTRIBUTE
    action: "Update extended context/results tables, track correlations"
  - step: 4. SPIN OFF
    action: "When patterns emerge, create child schemas with refined conditions"

This maps directly to PLAY-LEARN-LIFT:

  • PLAY = ACT + OBSERVE
  • LEARN = ATTRIBUTE
  • LIFT = SPIN OFF

Implementation: pyleela.brain

Henry Minsky (Marvin's son) implemented Drescher's schema mechanism in Python:

Class Purpose
World Central coordinator, tracks all items and s
Полный SKILL.md на GitHub

Установить schema-mechanism в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

CARD.ymlGLANCE.ymlOVERVIEW.mdREADME.mdcensors/BRAINBALL.mdcensors/LIVE.mdcensors/README.mdcensors/archetypes/the-baron.ymlcensors/archetypes/the-convert.ymlcensors/archetypes/the-credit-giver.ymlcensors/archetypes/the-crusader.ymlcensors/archetypes/the-dealmaker.ymlcensors/archetypes/the-dynast.ymlcensors/archetypes/the-fan.ymlcensors/archetypes/the-founder.ymlcensors/archetypes/the-helmsman.ymlcensors/archetypes/the-ideologue.ymlcensors/archetypes/the-ironist.ymlcensors/archetypes/the-loyal-friend.ymlcensors/archetypes/the-open-skeptic.ymlcensors/archetypes/the-principled-ally.ymlcensors/archetypes/the-restorer.ymlcensors/archetypes/the-unrepentant.ymlcensors/examples/baron/RUN.mdcensors/examples/baron/case.ymlcensors/examples/baron/convert.ymlcensors/examples/baron/crusader.ymlcensors/examples/baron/fan.ymlcensors/examples/baron/ironic-crusader.ymlcensors/examples/baron/ironist.ymlcensors/examples/baron/loyal-friend.ymlcensors/examples/baron/stage.ymlcensors/examples/beekeepers-open-skeptic.ymlcensors/examples/beekeepers-second-round.record.ymlcensors/examples/beekeepers-second-round.ymlcensors/examples/beekeepers.RUN.mdcensors/examples/beekeepers.ymlcensors/examples/dentist-letter.RUN.mdcensors/examples/dentist-letter.answers.ymlcensors/examples/dentist-letter.yml

FAQ

Что делает скилл schema-mechanism?

Drescher's computational theory of causal learning

Как установить скилл schema-mechanism?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл schema-mechanism запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить schema-mechanism с