Command Palette

Search for a command to run...

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

learn

БесплатноЗапускает вложенные скриптыНе проверен

Distill learnings from completed features and propose amendments to constitution.md or prompt.md. Use after feature completion. Triggers on: capture…

ArvorCoот ArvorCo★ 100 звёзд на GitHub

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

Relentless Learning System

Capture learnings from completed features and propose amendments to improve future runs.

Philosophy: "Loop Ralph" - Create a feedback loop where each feature execution improves the system for future features.


SpecKit Workflow

This skill is optional and runs after feature completion:

specify → plan → tasks → convert → analyze → implement → (optional) learn

Prerequisites:

  • Feature must be complete (all stories passes: true or skipped: true)
  • progress.txt must exist with iteration learnings
  • prd.json must exist with execution data
  • constitution.md and/or prompt.md must exist in relentless/

The Job

  1. Extract learnings from completed feature (using CLI scripts)
  2. Classify each learning (Constitutional / Tactical / Discard)
  3. Generate proposals for human approval
  4. Apply approved amendments to constitution.md or prompt.md
  5. Save learning log to feature directory
  6. Update aggregate stats

Step 0: Run Extraction Scripts

IMPORTANT: Use CLI scripts for extraction - do NOT read entire files into context.

Run the extraction scripts from .claude/skills/learn/scripts/:

# Main extraction - runs all extractors
bash .claude/skills/learn/scripts/extract-learnings.sh relentless/features/<feature-name>

# Individual extractors (run by main script):
# - extract-patterns.sh - Patterns from progress.txt
# - extract-costs.sh - Cost accuracy from prd.json
# - extract-failures.sh - Failed checks from checklist.md
# - extract-errors.sh - Error patterns from progress.txt

The output is compact JSON (~500 tokens max):

{
  "patterns": ["Pattern 1: description", "Pattern 2: description"],
  "costs": {"feature": "name", "estimated": 0.45, "actual": 0.52},
  "failures": ["Unchecked item 1", "Unchecked item 2"],
  "errors": ["Error context 1", "Error context 2"]
}

If more context is needed for a specific story:

# Extract session context for deeper investigation
bash .claude/skills/learn/scripts/extract-session-context.sh relentless/features/<feature-name> US-XXX

Step 1: Parse Extracted Data

Parse the JSON output from the extraction scripts:

  1. Patterns: Reusable learnings discovered during implementation
  2. Costs: Cost accuracy metrics (estimated vs actual)
  3. Failures: Unchecked checklist items (potential gaps)
  4. Errors: Error patterns that were fixed (potential rules)

Count and categorize:

  • How many patterns were discovered?
  • Was cost estimation accurate (>80%)?
  • Are there unchecked checklist items (quality gaps)?
  • What error patterns emerged?

Step 2: Classify Learnings

For each learning, classify as:

Type Target Criteria Example
Constitutional constitution.md Applies to ALL features, governance/quality/process, prevents significant issues "Always export new types with implementation"
Tactical prompt.md Specific to task types or tech stack, workflow tips, common pitfalls "Mock CLI calls in adapter tests"
Discard None One-time edge case, already covered, too specific "Fixed typo in variable name"

Constitutional criteria (becomes a MUST or SHOULD rule):

  • Applies universally to all features
  • Related to governance, quality, or process
  • Prevents significant issues if violated
  • Not already covered in constitution

Tactical criteria (becomes a prompt.md pattern):

  • Specific to certain task types or tech stack
  • Workflow tip or common pitfall
  • Helps agents avoid repeated mistakes
  • Not governance-level

Discard criteria (do not propose):

  • One-time edge case
  • Already covered by existing rules
  • Too specific to be reusable
  • Subjective preference

Step 3: Generate Proposals

Generate maximum 5 constitutional + 5 tactical proposals per feature.

Constitutional Proposal Format:

### PROP-C01: [Short Title]

**Target:** constitution.md > Principle [N] > [MUST|SHOULD]

**Amendment:**
> [1-2 sentence rule in imperative form]

**Evidence:**
> [Quote from progress.txt showing the issue]

**Classification:** Constitutional - [Rationale why this applies to all features]

Tactical Proposal Format:

### PROP-T01: [Short Title]

**Target:** prompt.md > [Section Name]

**Amendment:**
> [1-2 sentence tip or pattern]

**Evidence:**
> [Quote from progress.txt showing the context]

**Classification:** Tactical - [Rationale why this is task-specific]

Discarded Learnings (include for transparency):

### Discarded Learnings

| Learning | Reason |
|----------|--------|
| Fixed typo in variable name | One-time edge case |
| Used specific API endpoint | Already covered in docs |

Step 4: Present for Human Approval

Use the proposal template from templates/learning-proposal.md to format the output.

The proposal should include:

  1. Feature Summary: Name, stories, escalations, cost accuracy
Полный SKILL.md на GitHub

Установить learn в Claude Code и Claude Desktop

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

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

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

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

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

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

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

scripts/common.shscripts/extract-costs.shscripts/extract-errors.shscripts/extract-failures.shscripts/extract-learnings.shscripts/extract-patterns.shscripts/extract-session-context.shscripts/generate-stats.shtemplates/learning-proposal.mdtemplates/stats.md

FAQ

Что делает скилл learn?

Distill learnings from completed features and propose amendments to constitution.md or prompt.md. Use after feature completion. Triggers on: capture learnings, learn from feature, distill learnings, relentless learn.

Как установить скилл learn?

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

Скилл learn запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить learn с