Usage & Features
Continual learning
On this page
Chain Hub queues short learning events and turns them into reviewed improvements — never silent edits to protected core/ skills.
The full Brain → Pipeline UI (Inbox, Drafts, For you, Activity) requires an active Chain Hub Pro license. OSS installs can still run chain capture and chain reflect from the CLI; see Chain Hub Pro.
Capture
Events append to learnings/queue/inbox.jsonl. Use --event (success, failure, correction, note) and --skill or --target (skill, workflow, agent, rule).
When you omit --repo, chain capture auto-fills a project tag from the current directory (or workspace display name after chain memory init). That tag keeps learnings separated in the hub inbox and controls where approved changes land later.
Reflect (CLI)
chain reflect groups the inbox by target, writes learnings/drafts/distill-*.md, and archives the inbox. --dry-run previews without writing.
Brain Pipeline (recommended)
Open the hub and go to Brain → Pipeline (chain hub → #brain):
Project scope (hub-wide vs workspace memory)
| Scope | How it is tagged | After you approve Apply |
|---|---|---|
| Hub-wide | No repo_hint on the capture | Patches shared hub assets (skills/, workflows/, …) under ## Recent Learnings |
| Project | Capture included --repo or cwd tag (_repo:…_ in drafts) | Workspace memory rule under memory/workspaces/<id>/ (Brain → Memory → This project) — not a shared skill file |
The pipeline groups learnings by project in Advanced → Inbox, Distilled Drafts, and For you:
- Inbox (Advanced) — default This project filter; toggle All projects to see captures grouped by
repo_hint. Use Save as memory for one-off promotions; Delete project-specific noise you do not want distilled. - Distilled Drafts — each card shows Hub-wide vs Project insight counts and which projects contributed. View details previews which bullets become shared patches vs workspace memory.
- For you — proposals are grouped by Hub-wide or project name. Project memory proposals apply only when the project is linked (
chain memory initin that repo). Reject anything still too vague or wrongly scoped.
Example: a capture tagged grocery-pal about gitflow ports must not land in a shared git-workflow skill. Generate routes it to a workspace memory proposal instead. Hub-wide patterns (no project tag) still patch shared skills after approval.
Pipeline tabs
- For you — review hub-wide patches and project memory proposals. Approve only what you want, then Apply. Approve all low-risk batch-applies every linked low-risk update (unlinked project memory stays for manual review). Nothing is written until you approve.
- Activity — read-only log of automation runs and project memory updates (pipeline applies, inbox promotions, manual project rules). Toggle This project / All projects for the last 30 days. Use Restore last cleanup if you want deleted inbox notes back.
- Advanced — manual inbox triage, Reflect & Distill, and draft tools for power users.
When low-value notes pile up, the hub shows Clean up & continue — one click removes session noise, distills kept insights, generates proposals, and archives drafts. With Settings → Brain → Automatic inbox cleanup enabled and Settings → Advanced → Experimental Engine on, that cleanup runs when you open Pipeline (no extra click).
Proposals still require explicit approval before Apply. After a successful apply, linked drafts move to learnings/drafts/archive/. Use Advanced → Archive processed or POST /api/reflect/drafts/archive-processed for bulk draft cleanup.
CLI-only improve mode
Runs reflection and proposal generation in one step for automation; the hub For you queue remains the safest place to review and apply changes.
The bundled hub-gardener workflow (under workflows/ after chain init) documents the full checklist: capture → reflect → review → validate → apply (hub-first; monorepo changes via PR only).
Pipeline API
| Method | Path | Purpose |
|---|---|---|
GET | /api/pipeline/status | Pending proposals, inbox triage counts, restore availability |
POST | /api/pipeline/cleanup-and-continue | Delete recommended notes → distill → generate |
POST | /api/pipeline/process-inbox | Distill + generate (no deletes) |
POST | /api/improve/proposals/approve-all-low-risk | Approve and apply all draft low-risk proposals (skips unlinked project memory) |
POST | /api/pipeline/restore-last-cleanup | Re-append notes from the last cleanup backup |
GET | /api/pipeline/activity | Recent automation runs |
Hub settings in .chain-hub/hub-settings.json control automation:
advanced.experimentalEngine— Settings → Advanced; required for pipeline automation endpointsbrainPipeline.autoTriage— Settings → Brain; automatic cleanup on Pipeline open (only when Experimental Engine is on)
See Advanced settings for the full reference.