Learning
/Learning
Closed-loop behavioural improvement — mine signals, synthesise patterns, propose changes, review, apply. USE WHEN learn, learn check, learn review, learn apply, mine reflections, mine ratings, algorithm upgrade, improve the algorithm, what have we learned, internal improvements, close the loop, learning synthesis, learning status, check signals, what's happening, review proposals, what should change, apply changes, apply proposals.
- Author
- virtualian ↗
- Repository
- pai ↗
- Licence
- MIT
- Last repository change
- 09.06.2026
Assessment and security
- Files in this package
- 5
- Scripts
- 1
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 09.06.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 1 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: Tools/MineRatings.ts
What it does and when to use it
Closed-loop behavioural improvement — mine signals, synthesise patterns, propose changes, review, apply. USE WHEN learn, learn check, learn review, learn apply, mine reflections, mine ratings, algorithm upgrade, improve the algorithm, what have we learned, internal improvements, close the loop, learning synthesis, learning status, check signals, what's happening, review proposals, what should change, apply changes, apply proposals.
Original author description
Closed-loop behavioural improvement — mine signals, synthesise patterns, propose changes, review, apply. USE WHEN learn, learn check, learn review, learn apply, mine reflections, mine ratings, algorithm upgrade, improve the algorithm, what have we learned, internal improvements, close the loop, learning synthesis, learning status, check signals, what's happening, review proposals, what should change, apply changes, apply proposals.
How it works
- Customization
- Workflow Announcement
- Commands
- Workflow Routing
- Status Display (bare /learn)
- Data Sources
- Pipeline Output Files
- Tool Reference
- Cross-Skill Integration
SKILL.md preview
---
name: Learning
description: Closed-loop behavioural improvement — mine signals, synthesise patterns, propose changes, review, apply. USE WHEN learn, learn check, learn review, learn apply, mine reflections, mine ratings, algorithm upgrade, improve the algorithm, what have we learned, internal improvements, close the loop, learning synthesis, learning status, check signals, what's happening, review proposals, what should change, apply changes, apply proposals.
---
## Customization
**Before executing, check for user customizations at:**
`~/.pai/PAI/USER/SKILLCUSTOMIZATIONS/Learning/`
If this directory exists, load and apply any PREFERENCES.md, configurations,
or resources found there. These override default behavior. If the directory
does not exist, proceed with skill defaults.
## Workflow Announcement
When executing a workflow, output a text announcement:
```
Running the **WorkflowName** workflow in the **Learning** skill to ACTION...
```
# Learning Skill
**Purpose:** Closed-loop behavioural improvement pipeline. Records activity, extracts signals,
synthesises patterns, proposes changes, enables human review, and applies approved changes
to three targets: Algorithm spec, AISTEERINGRULES.md, and feedback memories.
**Architecture:**
```
Capture Layer (hooks) Analysis + Action Layer (this skill)
┌──────────────────────┐ ┌──────────────────────────────────────────────┐
│ RatingCapture.hook │ │ │
│ WorkCompletion.hook │ │ /learn check /learn review /learn apply│
│ LoadContext.hook │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐│
│ learning-readback │ │ │ 1. Mine │ │3. Propose│ │5. Apply ││
│ │ │ │ 2. Synth │ │4. Review │ │ (2-gate)││
└──────────┬───────────┘ │ └────┬─────┘ └────┬─────┘ └────┬─────┘│
│ │ │ │ │ │
v │ v v v │
MEMORY/LEARNING/ │ mine-output.md review.md Algorithm │
(ratings.jsonl, │ last-synthesis.md STEERING │
reflections.jsonl) │ Memories │
└──────────────────────────────────────────────┘
```
## Commands
| Command | Action | Workflow |
|---------|--------|----------|
| `/learn check` | Mine signals, synthesise patterns, print summary | `Workflows/Check.md` |
| `/learn review` | Generate/update proposals, open review file | `Workflows/Review.md` |
| `/learn apply` | Stage diffs for accepted proposals, apply after review | `Workflows/Apply.md` |
## Workflow Routing
| Trigger | Route |
|---------|-------|
| "learn check", "check signals", "what's happening", "close the loop", "learning synthesis", "what have we learned", "mine reflections", "mine ratings" | `Workflows/Check.md` |
| "learn review", "review proposals", "what should change", "algorithm upgrade", "improve the algorithm" | `Workflows/Review.md` |
| "learn apply", "apply changes", "apply proposals" | `Workflows/Apply.md` |
**Default:** If user says "learn" without a subcommand, show status (see below).
## Status Display (bare `/learn`)
When invoked with no subcommand, display pipeline status:
1. **Check status:** Read `~/.pai/MEMORY/LEARNING/last-synthesis.md` frontmatter for `generated` timestamp. Report when check last ran.
2. **Proposal counts:** Read `~/.pai/MEMORY/LEARNING/review.md` if it exists. Count proposals by status (PENDING, ACCEPTED, DEFERRED, REJECTED, APPLIED).
3. **Unprocessed signals:** Compare the `generated` timestamp from last-synthesis.md against the modification times of `ratings.jsonl` and `algorithm-reflections.jsonl`. If signals are newer than the last synthesis, report "Unprocessed signals exist since last check."
Output format:
```
## Learning Pipeline Status
**Last check:** [timestamp or "never"]
**Proposals:** [N] pending | [N] accepted | [N] deferred | [N] applied
**Unprocessed signals:** [yes/no — signals newer than last synthesis]
Next steps:
- `/learn check` to mine and synthesise new signals
- `/learn review` to generate or update proposals
- `/learn apply` to apply accepted proposals
```
## Data Sources
| Source | Location (runtime) | Writer | Content |
|--------|----------|--------|---------|
| Algorithm reflections | `~/.pai/MEMORY/LEARNING/REFLECTIONS/algorithm-reflections.jsonl` | Algorithm LEARN phase | Q1/Q2/Q3 reflections per session |
| User ratings | `~/.pai/MEMORY/LEARNING/SIGNALS/ratings.jsonl` | RatingCapture.hook.ts | Explicit + implicit ratings with sentiment |
| HWM state | `~/.pai/MEMORY/LEARNING/SIGNALS/mine-ratings-hwm.json` | MineRatings.ts | Last-processed timestamp for incremental analysis |
## Pipeline Output Files
| File | Writer | Content | Persistence |
|------|--------|---------|-------------|
| `MEMORY/LEARNING/mine-output.md` | Check workflow | Raw mining results | Replaced each run |
| `MEMORY/LEARNING/last-synthesis.md` | Check workflow | Cross-referenced synthesis | Replaced each run |
| `MEMORY/LEARNING/review.md` | Review workflow + human | Proposals with lifecycle status | Persistent, accumulates |
| `MEMORY/LEARNING/staged-changes.md` | Apply workflow | Diffs with checkboxes | Transient, deleted after apply |
| `MEMORY/LEARNING/digest.md` | Human (manual compaction) | Compressed signal history | Persistent |
## Tool Reference
| Tool | Purpose |
|------|---------|
| `Tools/MineRatings.ts` | Behavioral pattern analysis from ratings (CLI tool, uses Inference.ts) |
## Cross-Skill Integration
The **PAIUpgrade** skill's Upgrade workflow calls the Learning skill's Check workflow
as Thread 3 to include internal signals alongside external discoveries:
```
PAIUpgrade Upgrade workflow:
Thread 1: User Context (own agents)
Thread 2: Source Collection (own agents)
Thread 3: Internal Signals (calls Learning/Check or reads last-synthesis.md)
```
Files in this package (5)
- SKILL.md 6 KB
- Tools/MineRatings.ts 12 KB
- Workflows/Apply.md 8 KB
- Workflows/Check.md 10 KB
- Workflows/Review.md 10 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · virtualian/pai | 95 | MIT |
| DaraBoth/skilljmskill | 100 | MIT |
| ScotterMonk/AgentAutoFlow | 100 | CC0-1.0 |
| t8jwscc7qy-sketch/foma-skills | 90 | Apache-2.0 |
| clawic/skills | 90 | MIT |
| virtualian/pai | 90 | MIT |
Database snapshot: 13.11.2026 · package version 13f48672ae2c (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95learn
Closed-loop behavioural improvement — mine signals, synthesise patterns, propose changes, review, apply. USE WHEN learn, learn check, learn review, learn apply, mine reflections, mine ratings, algorithm upgrade, improve the algorithm, what have we learned, internal improvements,… - 90improve
Apply accumulated self-improvement signals. Use when the user asks to run an improvement pass or "apply reflections" — reads Reflections/, applies changes that have earned it, updates standing lessons in MEMORY.md. - 92apply-improvements
This skill should be used when the user asks to apply improvement proposals ('apply improvements', 'ap dung improvement proposals') from .claude/improvement-proposals.md (written by pipeline-retrospective) to the plugin files. - 100algorithm-update
Run a maintainer algorithm-update session — synthesize the collected Q2 ("smarter algorithm") reflections, cluster the recurring ideas, and fold approved changes into ALGORITHM.md. Use when the session reminder shows "Algorithm Review Due", or when asked to review/update the… - 100self-learn
Extract reusable patterns from recent sessions, propose framework improvements, and (with approval) update the framework docs. This is the dogfooding meta-loop — the project learns from its own usage. Use when the user says "learn from this", "what did we learn", "extract… - 95PAIUpgrade
Extract system improvements from content AND monitor external sources (Anthropic ecosystem, YouTube). USE WHEN upgrade, improve system, system upgrade, analyze for improvements, check Anthropic, Anthropic changes, new Claude features, check YouTube, new videos, algorithm…