# Learn

Knowledge compiler.

- Repository: https://github.com/SethGammon/Citadel (927 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add SethGammon/Citadel --skill learn -g -a claude-code -y`
Codex: `npx skills add SethGammon/Citadel --skill learn -g -a codex -y`
Cursor: `npx skills add SethGammon/Citadel --skill learn -g -a cursor -y`
Gemini CLI: `npx skills add SethGammon/Citadel --skill learn -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add SethGammon/Citadel`

## Description

Knowledge compiler. Extracts patterns, decisions, and anti-patterns from completed campaigns and evolve cycles, then compiles them into structured wiki pages that integrate with existing knowledge rather than appending isolated files. Implements flush→compile→lint pipeline. Auto-triggered by /postmortem and /evolve Phase 6.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# /learn, Knowledge Compiler

## Orientation

**Use when:** You have a completed campaign or evolve cycle and want to compile
its findings into the project's growing knowledge wiki, so future sessions
start smarter, not from scratch.

**Don't use when:** You want a structured incident analysis first (use `/postmortem`, run it before `/learn`); you haven't finished any campaigns (nothing to compile);
you want a context transfer only (use `/session-handoff`).

**Key difference from appending:** `/learn` doesn't create isolated per-campaign
files. It integrates new findings into existing wiki pages, updating evidence
lists, raising confidence where a pattern is confirmed again, and flagging
contradictions. A wiki is a compiler; a log is an interpreter.

## Invocation Forms

```
/learn, most recently completed campaign
/learn {slug}, specific campaign by slug
/learn {file-path}, specific campaign file path
/learn --from-evolve {target}, compile from /evolve pattern library
/learn --from-evolve {target} --cycle {n}, specific evolve cycle only
/learn --lint, lint-only pass (no new extraction)
/learn --compile, re-compile staging area into wiki (no new extraction)
/learn --memory, compile semantic memory blocks from planning artifacts
/learn --doc-sync, process doc-sync queue into .planning/doc-sync/latest.md
```

## Inputs

1. A campaign slug, file path, evolve target, or "most recent" resolution
2. Corresponding postmortem in `.planning/postmortems/` (optional)
3. `.planning/telemetry/audit.jsonl` filtered to this campaign (optional)
4. For `--from-evolve`: `.planning/evolve/{target}/pattern-library.md`

## Protocol

### Step 1: RESOLVE TARGET

The rest: https://github.com/SethGammon/Citadel/blob/HEAD/skills/learn/SKILL.md
