Skip to content

Repository files navigation

Aniloop

License: MIT Agent skill Engine: v2.2 frozen

A closed-loop learning system for AI agents: teach → practice → retain.

Aniloop teaches you, drills you, and remembers exactly what you missed.

简体中文 · Architecture & roadmap

Aniloop is one agent skill with two modes (for Codex- / Claude-style skill runners), sharing one store and one frozen engine:

Mode Role Fires on
Teaching A step-by-step concept tutor: symbol contracts, small steps, verifiable checkpoints, L1 intuition → L4 boundaries, adaptive hints, session archives. "教我X" · "what is…" · "I don't get…" · "继续"
Cards Turns notes, exams, mistakes, or a teaching session into one self-contained offline HTML review page with Leitner spaced scheduling (Mini / Pro / Max). "做复习卡" · "错题本" · "active recall" · "flashcards"

Each mode is fully useful on its own. Together they form a retention loop.

The loop

graph LR
  A[Teaching mode teaches a concept] --> B[archives deck.json, marks weak points]
  B --> C[generates review.html seeded with prior state]
  C --> D[you practice and export the state json]
  D --> E[drop it back into aniloop/topic/]
  E --> F[next session's warm-up drills exactly what you missed]
  F --> A
Loading

Everything durable lives in aniloop/<topic>/ in your working directory: learning-log.md (curriculum & mastery) · deck.json (cards of record) · review-state.json (real practice results) · review.html (the drill page). The cards you fail flow back, so the next lesson opens by testing exactly what you missed ("先测后学") — verified end-to-end, including a fresh agent session resuming purely from the on-disk store.

Architecture in one line

One skill, two modes, one frozen engine. SKILL.md routes between modes and carries the full teaching protocol; the cards spec loads on demand (references/cards-core.md); the Leitner engine (interaction-core.md, v2.2) and the standard page shell (page-shell.md) exist as single canonical copies — no vendoring, nothing to keep in sync. On a standard Pro/Max page the model writes only deckMeta / coreConfig / cards. History and rationale (including the earlier two-skill architecture this replaced): DESIGN.md.

Install

Install into your agent's skill-discovery directory (~/.codex/skills, or set CODEX_HOME):

git clone https://github.com/loraldx/aniloop.git && cd aniloop
./install.sh

Or link manually:

mkdir -p ~/.codex/skills
ln -s "$(pwd)/skills/aniloop" ~/.codex/skills/aniloop

For Claude Code, either point CODEX_HOME at ~/.claude, or keep this repo as the canonical copy and drop a thin adapter SKILL.md into your Claude skills directory whose first instruction is "read the canonical SKILL.md at /skills/aniloop and follow it" plus your runtime substitutions (widget tools, browser render-check).

Restart your agent so the skill list refreshes.

Repository layout

aniloop/
├── skills/
│   └── aniloop/           # the skill: SKILL.md router + references/
│       ├── SKILL.md               # mode dispatch + teaching protocol + store contract
│       ├── agents/openai.yaml
│       └── references/            # cards-core, interaction-core (frozen v2.2),
│                                  # page-shell, loop-state, persistence, …
├── DESIGN.md              # architecture + roadmap (incl. v1→v2 merge rationale)
├── install.sh             # install the skill
├── scripts/assemble.sh    # pull the skill from your local checkout into skills/
├── CHANGELOG.md
├── CONTRIBUTING.md · CODE_OF_CONDUCT.md · SECURITY.md · LICENSE
└── .github/               # issue + PR templates, CI (structure + engine syntax check)

Status

v2 — research preview, actively used. The review engine is frozen at v2.2 (18 unit tests + 12 in-browser E2E checks); the full teach→practice→resume loop has been exercised live with multi-agent teaching simulations across math, economics, and programming. Remaining roadmap: DESIGN.md.

Contributing

See CONTRIBUTING.md and the Code of Conduct. One hard rule: the review engine (skills/aniloop/references/interaction-core.md) is frozen — extend it via window.ISC, never edit its logic; version bumps replace the block wholesale with tests to prove behavior.

License

MIT © 2026 loraldx.

About

Closed-loop learning skill for AI agents: teach → practice → retain. One skill, two modes, frozen Leitner engine (v2.2).

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages