--- name: learn description: Learn from user corrections, frustrations, workflow outcomes, and temporary .tkstack sessions. Use for /learn, help, repeated instructions, a rejected approach, session consolidation, report-only audits, or direct skillify/hookify/instructify/flowify/lintify/reusify/codify subcommands. Preserve provenance, extract scoped reasoning rules, and turn verified procedural lessons into reviewable reusable artifacts shared across harnesses. license: MIT compatibility: "Requires Python 3.11 or newer for the bundled helper. The steering format has no harness dependency. Typed contract tools require Python 3.11+ and the managed command-schema runtime." metadata: author: Tyler Kendrick version: "0.8.0" --- # Learn Tool: `.tkstack/tkstack skills learn -- `. Omit the command for deterministic man-page help. | Executable operation | Contract | | --- | --- | | Default/help and man(1) export | [Reserved help](commands/help.md) | | Declared package version | [Reserved version](commands/version.md) | | `model` | [Typed parameters](commands/model.md) | | `verify` | [Typed parameters](commands/verify.md) | | `native capture` | [Typed parameters](commands/native_capture.md) | | `native rule` | [Typed parameters](commands/native_rule.md) | | `native experience` | [Typed parameters](commands/native_experience.md) | | `native show` | [Typed parameters](commands/native_show.md) | | `native sessions review` | [Typed parameters](commands/native_sessions_review.md) | | `codify [command ...]` | [Mounted subskill](commands/codify.md) → [`skills/codify`](skills/codify/SKILL.md) | | `flowify [command ...]` | [Mounted subskill](commands/flowify.md) → [`skills/flowify`](skills/flowify/SKILL.md) | | `hookify [command ...]` | [Mounted subskill](commands/hookify.md) → [`skills/hookify`](skills/hookify/SKILL.md) | | `instructify [command ...]` | [Mounted subskill](commands/instructify.md) → [`skills/instructify`](skills/instructify/SKILL.md) | | `lintify [command ...]` | [Mounted subskill](commands/lintify.md) → [`skills/lintify`](skills/lintify/SKILL.md) | | `reusify [command ...]` | [Mounted subskill](commands/reusify.md) → [`skills/reusify`](skills/reusify/SKILL.md) | | `skillify [command ...]` | [Mounted subskill](commands/skillify.md) → [`skills/skillify`](skills/skillify/SKILL.md) | | Evidence, effects, native execution, and semantic boundaries | [Execution contract](references/execution.md) | `model` reads the explicit contract; `verify` checks retained facts/evidence. Native commands execute existing code. Each ___ify subcommand passes its remaining arguments to the packaged subskill, whose own commands and lock type and bind them. Residual semantic decisions use the focused procedures below; a recorded review is not an independently authenticated judgment. Capture visible user corrections and frustrations as evidence, then improve the scoped reasoning rule behind the mistake. Tool observations and skill research are procedural evidence, not user authority. Continue the user's active task. Invoke `/learn [request]` or `$learn [request]`. Use `help [command]` for read-only discovery; ` help` also requests guidance. Native helper: `python3 /scripts/learn.py help [topic]`; running the helper without a command shows help without initializing state. | Signal | Read before acting | | --- | --- | | Help, command syntax, parameters, or direct ___ify invocation | [Subcommands and handoff contract](references/subcommands.md) | | Package a reusable procedure | [`skillify`](references/subcommands.md#skillify), [package](skills/skillify/SKILL.md) | | Enforce a tool-event policy | [`hookify`](references/subcommands.md#hookify), [package](skills/hookify/SKILL.md) | | Maintain scoped agent instructions | [`instructify`](references/subcommands.md#instructify), [package](skills/instructify/SKILL.md) | | Create a workflow in a native DSL | [`flowify`](references/subcommands.md#flowify), [package](skills/flowify/SKILL.md) | | Create a CLI lint rule | [`lintify`](references/subcommands.md#lintify), [package](skills/lintify/SKILL.md) | | Reuse code assets or bootstrap extraction with `init` | [`reusify`](references/subcommands.md#reusify), [package](skills/reusify/SKILL.md) | | Compile a prompt/Markdown procedure to a lock artifact | [`codify`](references/subcommands.md#codify), [package](skills/codify/SKILL.md) | | Correction, frustration, or explicit preference | [Capture, reason, curate, verify](references/operating-guide.md) | | Invoked /learn or consolidation of temporary sessions | [Session review, abstraction, mechanism selection, and execution](references/session-consolidation.md) | | Workspace/user/global storage or layered steering | [Storage scopes and paths](references/storage.md), [commands](references/records.md#scoped-stores-and-session-commands) | | Report/audit only | [Improvement and audit workflow](references/improvement.md) | | Requested skill improvement | [Improvement workflow](references/improvement.md), then [structural learning](references/structural-learning.md) | | Record schema, scopes, or helper commands | [Records](references/records.md) | | Find Grok's original body | [Actual source findings](references/grok-build.md) | Resolve the existing shared store before writing; standalone installs use the workspace store by default; user/global scopes are explicit. Never write into an installed plugin cache. Read layered curated rules with `show --all-scopes`. Preserve exact evidence and provenance. Reuse matching rules, keep uncertain interpretations candidate, retain retirement history, and honor the narrowest supported scope. Use `scripts/learn.py` from this package for deterministic capture, rule updates, experiences, rendering, and checks as specified in the operating guide. Only actual user messages justify user correction records. Explicit report/audit is read-only, including the ledger. Apply current instructions over older rules. Handle help before feedback capture or session review. A direct ___ify command hands only its request to the subskill packaged at `skills//`; preserve its scope, nested subcommands, parameters, and preview/audit intent. Read that subskill's index and run its actual procedure. Each subskill is a complete package (`SKILL.md`, `commands/`, `scripts/`, `references/`, lock) and ships inside Learn. The native helper prints guidance; it does not execute a subskill. Bare Learn or `consolidate` reviews selected `.tkstack/sessions//` evidence, extracts scoped transferable principles, chooses the smallest set of ___ify mechanisms, and carries authorized generalizations through verification. Raw session folders remain temporary/ignored; save useful evidence and durable lessons outside them before cleanup. Automatic correction capture stays narrow. For procedural changes, update a fitting owned skill before creating another. Encode factual invariants in code when possible. Direct requested changes use real engineering checks; automatic revision search retains SkillOpt's separate held-out strict/no-regression gate. No private history mining or invented model improvement. See [source adaptations](references/distilled-sources.md). For session/repository/workspace records, read [local state storage](references/storage.md).