Skip to content
Back to skills

Rota Learn

ASecurity

Use at the end of a session that surfaced reusable knowledge, after a correction-rich debugging arc, or on "save what we learned", "capture this learning", "/rota-learn".

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 6, 2026
developmentgobashtestingdebugginggitbackend

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned December 5, 2026

npx -y skills add l4ci/rota --skill rota-learn --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rota Learn?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rota Learn
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/l4ci-rota-learn/badge)](https://www.skillsdirectory.com/skills/l4ci-rota-learn)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rota-learn
description: Use at the end of a session that surfaced reusable knowledge, after a correction-rich debugging arc, or on "save what we learned", "capture this learning", "/rota-learn".
---

# rota-learn — Capture Session Learnings

Copy this checklist and track your progress:
```
- [ ] Step 1 — Parse Args
- [ ] Step 2 — Scan the Session for Learnings
- [ ] Step 3 — Classify by Topic
- [ ] Step 4 — Auto-Write
- [ ] Step 5 — Merge into KNOWLEDGE.md
- [ ] Step 6 — Update the Topic Index
- [ ] Step 7 — Opus Verification (opt-in)
- [ ] Step 8 — Confirm
```

## Step 1 — Parse Args

- `--strict`: run the Opus verifier (Step 7) for this run.
- `--retro [<session-id|path>]`: retrospective mode. Skip Steps 2 to 8 and follow *`--retro`* in [`references/learn-rare-modes.md`](references/learn-rare-modes.md), then exit.
- `--external-review`: maintenance pass over the external knowledge base. Skip Steps 2 to 8 and follow *`--external-review`* in [`references/learn-rare-modes.md`](references/learn-rare-modes.md), then exit.
- `--term <name>`, `--promote <topic> "<title>"`, `--deprecate <topic> "<title>"`, `--amend <topic> "<title>"`, `--remove <topic> "<title>"`: manual modes. Skip Steps 2 to 8 and follow the matching section of [`references/learn-rare-modes.md`](references/learn-rare-modes.md), then exit.

With none of those, run the normal flow (Step 2 onward), after the role check below.

### Role check (`round.role`)

Run `rota config show round.role` first.

- **`support`** or **round worker** (`ROTA_SLOT` is set, any role): do the Step 2 scan as usual, then read [`worker-roles.md`](worker-roles.md) for where the learnings go (they are posted, not written to a file).
- **main** (the default, no `ROTA_SLOT`): first harvest what workers posted, main-machine and support alike. `rota knowledge harvest --json` lists unharvested `learning` comments on issues merged in the round. Decide per comment: fold or reject. Fold an accepted one into `KNOWLEDGE.md` through Steps 3 to 6 (`rota knowledge add`). Either way mark it so it never lists again; a rejected comment is marked too. Mark all decided ones in one call (`--mark <id>,<id>,…`, or `--mark-all` once every listed comment is decided): one tracker comment per issue instead of one per learning. Then run the normal scan. The `harvest` listing exits 1 on the file backend (`blockedBy: backend`) and on a forge that cannot say who may write, such as GitLab (`blockedBy: forge`); on either, skip it and run the normal scan.

## Step 2 — Scan the Session for Learnings

Capture what would save a future `/rota-work` run from re-discovering it: gotchas, project conventions not obvious from code, constraints and invariants, root causes of hard-won bugs, decisions with rationale, tool quirks that block you now. A fixable quirk or workaround is an issue (`/rota-capture`; `/rota-bugreport` for rota's own mistakes), not a bullet; write one only while it blocks further work, and name the issue so the bullet goes when it lands.

**Skip:** anything documented in code or README, transient session state, obvious facts, framework-doc restatements, personal preferences.

If nothing qualifies, say so and stop. Don't manufacture learnings.

## Step 3 — Classify by Topic

Reuse existing `## Topic` headings in `.rota/KNOWLEDGE.md`; new topic only if nothing fits, never one per learning.

### Route each learning: project or external

Run `rota config show knowledge.external`. Empty means no external base: every learning is project knowledge and this subsection changes nothing.

With a path set, read [`external-routing.md`](external-routing.md) and follow it: it decides project or external per learning and writes the external ones.

## Step 4 — Auto-Write

Skip approval prompts for what you chose to keep (the per-comment fold-or-reject call in Step 1 is yours, not a prompt). Proceed to Step 5 (merge into `KNOWLEDGE.md`) and Step 6 (update the topic index).

Verification is **off by default**. Run Step 7 only when `--strict` is in the args or `.rota/config.json` has `learn.verify: true`.

## Step 5 — Merge into KNOWLEDGE.md

Format of `.rota/KNOWLEDGE.md` (size nudges for big topics come in Step 8; the merge always proceeds):

```markdown
# Knowledge

## <Topic>
- **<Title>** — <learning body> <!-- 2026-04-18 -->
- **<Title>** — <claim about code> <!-- 2026-04-18 sha:a1b2c3d -->
- <older legacy learning without title>
```

For a project learning tied to known files, pass `--path "<glob>"` for each applicable glob. This stores an optional `<!-- paths: ["glob"] -->` field before the date; installed Edit/Write hooks recall it once per session. Paths are relative to the project root, or the registered repo root for repo-local knowledge. `*` stays in one path segment; `**` spans directories. Omit the flag when no file scope is known. External knowledge does not accept it.

Each new bullet: short sentence-case `**Title**`, an em-dash (U+2014, not a hyphen), the body, and a trailing `<!-- YYYY-MM-DD -->` stamp. `rota knowledge add` dedups by (topic, title, case-insensitive): a repeat is a silent no-op and never overwrites. Leave untitled legacy bullets as-is.

**Commit sha.** When a candidate bullet names a function, file, flag or verb, ask for the commit it was true at, with HEAD as the recommended answer (`git rev-parse --short HEAD`), and pass it as `--sha`. The sha is stored beside the date, and `rota knowledge query` prints it, so a reader can run `git diff <sha>..HEAD -- <path>` and check that the named thing still exists. Skip the question for bullets that name no code (process, product, judgment). Do not backfill shas on existing bullets.

For each captured bullet, call:

```bash
printf '%s' "$BODY" | rota knowledge add --topic "<Topic>" --title "<Short rule title>" [--sha "<sha>"] [--path "<glob>"] --body-file -
```

The verb inserts at the top of the topic and stamps the date.

**Pre-step rules:**

- **New topics:** `## <Topic>` must already exist. Append the heading to `.rota/KNOWLEDGE.md` first (alphabetical, except `Build & Tooling` and `Architecture` may be pinned near the top), then call the verb.
- **Sharpened wording:** the verb never replaces an older entry. For a sharper version of an existing bullet, edit that bullet and skip `knowledge add`.

Exit 0 on insert or idempotent no-op (`changed: false`); exit 3 if the topic doesn't exist.

### Umbrella-mode routing

When `.rota/repos.json` registers at least one sub-repo, read [`umbrella-routing.md`](umbrella-routing.md) before calling `rota knowledge add`: it covers the `--repo` scope flag and the scope question. Step 6 and `/rota-learn --term` follow the same scope.

Single-repo projects: no `--repo` needed.

## Step 6 — Update the Topic Index

```bash
rota block knowledge
```

Updates the managed `<!-- rota-knowledge-start -->` block in the project instructions file (`AGENTS.md` if present, else `CLAUDE.md`; the verb resolves it, never hardcode). `/rota-work` reads this block to know when to consult `KNOWLEDGE.md`.

When `.rota/repos.json` registers a sub-repo, read [`umbrella-routing.md`](umbrella-routing.md) (*Step 6*) for the `--repo` flag.

## Step 7 — Opus Verification (opt-in)

Skip unless `--strict` was passed or `learn.verify` is `true`. Read [`verifier.md`](verifier.md) (dispatch, prompt, verdict rules) and follow it, then continue to Step 8.

## Step 8 — Confirm

Report in one compact block:

```
Captured 3 learnings into .rota/KNOWLEDGE.md:
  Testing (2 new)
  Networking (1 new)

Updated the topic index in <AGENTS.md|CLAUDE.md> — /rota-work will consult these on relevant tasks.
```

With an external base configured, add one line per destination: `Pushed 1 learning to the external base (Go)` or `Opened PR <url> for 1 learning (Go)`.

**Topic-size handling.** Run `rota knowledge stats --json`. When any topic in `data.topics` has `bullets >= 25` OR `bytes >= 10240`, read [`topic-size.md`](topic-size.md) (nudge or auto-split by `autonomy.level`, see [`references/autonomy.md`](references/autonomy.md)).

If verification ran and passed, add a middle line: `Opus verification: PASS — all entries durable, sharp, correctly categorized.` If it returned `PASS_WITH_NOTES`, replace that line with a one-liner naming what was adjusted. If it failed, say so and stop.

**Contradictions.** Run `rota knowledge contradiction list --json`. If `data.items` is empty, skip silently; otherwise process the queue per [`references/learn-rare-modes.md`](references/learn-rare-modes.md) (*Process contradiction candidates*).

## Key Principles

- **Durable, not ephemeral.** If it only matters this week, use `/rota-capture`.
- **Sharp and short.** One sentence, concrete claim; otherwise link to code.

## References

- [`references/persistence-skills.md`](references/persistence-skills.md): shared spine and divergence axes for `/rota-learn` and `/rota-decide`, including `--term` for Glossary entries.
- [`references/learn-rare-modes.md`](references/learn-rare-modes.md): `--external-review`, `--term`, `--promote`, `--deprecate`, `--amend`, `--remove`, and the contradiction queue.
- [`umbrella-routing.md`](umbrella-routing.md): Step 5 / 6 `--repo` scope flag and scope question in umbrella mode.
- [`external-routing.md`](external-routing.md): Step 3 project-or-external routing and external writes when `knowledge.external` is set.
- [`worker-roles.md`](worker-roles.md): Step 1 role check for `support` machines and round workers.
- [`topic-size.md`](topic-size.md): Step 8 nudge or auto-split for large topics.
- [`verifier.md`](verifier.md): Step 7 Opus verifier dispatch, prompt and verdict rules.

Files in this skill

  • SKILL.md5.9 KB
  • topic-size.md1.9 KB
  • umbrella-routing.md2 KB
  • verifier.md2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.