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

chain capture --event success --skill debug --summary "Always check symlink targets after chain setup"
chain capture --event correction --target workflow --skill hub-gardener --summary "Clarify rollback step"

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.

chain capture --event note --skill git-workflow --summary "GroceryPal uses develop for staging" --repo grocery-pal
chain memory init # once per repo — links workspace memory for Brain → Memory

Reflect (CLI)

chain reflect
chain reflect --dry-run

chain reflect groups the inbox by target, writes learnings/drafts/distill-*.md, and archives the inbox. --dry-run previews without writing.

Open the hub and go to Brain → Pipeline (chain hub#brain):

Project scope (hub-wide vs workspace memory)

ScopeHow it is taggedAfter you approve Apply
Hub-wideNo repo_hint on the capturePatches shared hub assets (skills/, workflows/, …) under ## Recent Learnings
ProjectCapture 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:

  1. 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.
  2. 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.
  3. For you — proposals are grouped by Hub-wide or project name. Project memory proposals apply only when the project is linked (chain memory init in 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

  1. 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.
  2. 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.
  3. 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

chain reflect --improve

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

MethodPathPurpose
GET/api/pipeline/statusPending proposals, inbox triage counts, restore availability
POST/api/pipeline/cleanup-and-continueDelete recommended notes → distill → generate
POST/api/pipeline/process-inboxDistill + generate (no deletes)
POST/api/improve/proposals/approve-all-low-riskApprove and apply all draft low-risk proposals (skips unlinked project memory)
POST/api/pipeline/restore-last-cleanupRe-append notes from the last cleanup backup
GET/api/pipeline/activityRecent automation runs

Hub settings in .chain-hub/hub-settings.json control automation:

  • advanced.experimentalEngineSettings → Advanced; required for pipeline automation endpoints
  • brainPipeline.autoTriageSettings → Brain; automatic cleanup on Pipeline open (only when Experimental Engine is on)

See Advanced settings for the full reference.