learning-aggregator
[Beta] Cross-session analysis of accumulated .learnings/ files. Reads all entries, groups by pattern_key, computes recurrence across sessions, and outputs ranked promotion candidates. This is the outer loop's inspect step — it turns raw learning data into actionable gap reports. Use on a regular cadence (weekly, before major tasks, or at session start for critical projects). Can be invoked manually or scheduled.
What this skill does
# Learning Aggregator Reads accumulated `.learnings/` files across all sessions, finds patterns, and produces a ranked list of promotion candidates. This is the outer loop's **inspect** step. Without this skill, `.learnings/` is a write-only log. Patterns accumulate but nobody synthesizes them. The same gap resurfaces two weeks later because no one looked. ## When to Use - **Weekly cadence** — scheduled or manual, review accumulated learnings - **Before major tasks** — check if the task area has known patterns - **After a burst of sessions** — consolidate findings from a sprint or incident - **When an entry's `Recurrence-Count` reaches the promotion threshold (>= 3)** — verify the candidate with full context ## What It Produces A **gap report** — a ranked list of patterns that have crossed (or are approaching) the promotion threshold, with evidence and recommended actions. ## Step 1: Read All Learning Files Read these files in `.learnings/`: | File | Contains | |------|----------| | `LEARNINGS.md` | Corrections, knowledge gaps, best practices, recurring patterns | | `ERRORS.md` | Command failures, API errors, exceptions | | `FEATURE_REQUESTS.md` | Missing capabilities | | `HEALS.md` | Verified runtime recoveries filed by `self-healing` — including `Handoff` blocks flagging recurring patterns ready for promotion | Parse each entry's metadata: - `Pattern-Key` — the stable deduplication key - `Recurrence-Count` — how many times this pattern has been seen - `First-Seen` / `Last-Seen` — date range - `Priority` — low / medium / high / critical - `Status` — pending / in_progress / resolved / wont_fix / promoted / promoted_to_skill (the writer's vocabulary; promotion readiness is computed from `Recurrence-Count`, not stored as a status) - `Area` — frontend / backend / infra / tests / docs / config - `Related Files` — which parts of the codebase are affected - `Source` — conversation / error / user_feedback / simplify-and-harden - `Tags` — free-form labels ## Step 2: Group and Aggregate Group entries by `Pattern-Key`. For each group: 1. **Sum recurrences** across all entries with the same key 2. **Count distinct tasks** — how many different sessions/tasks encountered this 3. **Compute time window** — days between First-Seen and Last-Seen 4. **Collect all related files** — union of all entries' file references 5. **Take highest priority** across entries in the group 6. **Collect evidence** — the Summary and Details from each entry For entries without a `Pattern-Key`, use conservative grouping only: - **Exact match**: Same `Area` AND at least 2 identical `Tags` - **File overlap**: Same `Related Files` path (exact path match, not substring) - **Do NOT fuzzy-match** on Summary text — false groupings are worse than ungrouped entries Flag ungrouped entries separately with a recommendation to assign a `Pattern-Key`. Ungrouped entries are common and expected — they may be one-off issues or genuinely novel problems. ## Step 3: Rank and Classify ### Promotion Threshold An entry is **promotion-ready** when: - `Recurrence-Count >= 3` across the group - Seen in `>= 2 distinct tasks` - Within a `30-day window` ### Approaching Threshold An entry is **approaching** when: - `Recurrence-Count >= 2` or - `Priority: high/critical` with any recurrence ### Classification For each promotion candidate, classify the gap type: | Gap Type | Signal | Fix Target | |----------|--------|------------| | **Knowledge gap** | Agent didn't know X | Update project instruction files (CLAUDE.md, AGENTS.md, .github/copilot-instructions.md) | | **Tool gap** | Agent improvised around missing capability | Add or update MCP tool / script | | **Skill gap** | Same behavior pattern keeps failing | Create or update a skill (use `/skill-creator`, validate with `quick_validate.py`, register `skill-check` eval) | | **Ambiguity** | Conflicting interpretations of spec/prompt | Tighten instructions or add examples | | **Reasoning failure** | Agent had the knowledge but reasoned wrong | Add explicit decision rules or constraints | ## Step 4: Produce Gap Report Output a structured report: ```markdown ## Learning Aggregator: Gap Report **Scan date:** YYYY-MM-DD **Period:** [since date] to [now] **Entries scanned:** N **Patterns found:** N **Promotion-ready:** N **Approaching threshold:** N ### Promotion-Ready Patterns #### 1. [Pattern-Key] — [Summary] - **Recurrence:** N times across M tasks - **Window:** First-Seen → Last-Seen - **Priority:** high - **Gap type:** knowledge gap - **Area:** backend - **Related files:** path/to/file.ext - **Evidence:** - [LRN-YYYYMMDD-001] Summary of first occurrence - [LRN-YYYYMMDD-002] Summary of second occurrence - [ERR-YYYYMMDD-001] Summary of related error - **Recommended action:** Add rule to project instruction files (CLAUDE.md, AGENTS.md, .github/copilot-instructions.md): "[concise prevention rule]" - **Eval candidate:** Yes — [description of what to test] #### 2. ... ### Approaching Threshold #### 1. [Pattern-Key] — [Summary] - **Recurrence:** 2 times across 1 task - **Needs:** 1 more recurrence or 1 more distinct task - ... ### Ungrouped Entries (no Pattern-Key) - [LRN-YYYYMMDD-005] "Summary" — needs pattern_key assignment - ... ### Dismissed / Stale - Entries with Last-Seen > 90 days ago and Status: pending → recommend dismissal ``` ## Step 5: Handoff The gap report feeds into: 1. **harness-updater agent** — takes promotion-ready patterns and applies them to project instruction files (CLAUDE.md, AGENTS.md, .github/copilot-instructions.md) 2. **eval-creator skill** — takes eval candidates and creates permanent test cases 3. **Human review** — for patterns classified as "reasoning failure" or "ambiguity" (these need human judgment) ## Filtering - `--since YYYY-MM-DD` — only scan entries after this date - `--min-recurrence N` — raise the promotion threshold - `--area AREA` — filter to a specific area (frontend, backend, etc.) - `--deep` — also analyze session traces via Entire (see Session Trace Analysis below) ## Session Trace Analysis The outer loop reads from two complementary sources: | Source | What it is | Cadence | Cost | |--------|-----------|---------|------| | `.learnings/` | Explicit entries written by self-improvement during sessions. Agent's own reflections: corrections, knowledge gaps, recurring patterns it noticed. | Every session (hot path) | Near-zero | | Session traces | Full session transcripts captured by [Entire](https://entire.io): prompts, tool calls, outputs, files modified, token usage, checkpoints. | Weekly or on-demand (cold path) | Expensive — only run at cadence | The default mode reads `.learnings/` and produces a gap report from what the agent explicitly logged. The `--deep` mode also analyzes session traces and merges findings from both sources. ### Why both sources matter `.learnings/` captures what the agent **noticed and chose to log** — a curated subset. Session traces capture **everything that happened**, including patterns the agent worked around, retried, or never recognized as failures. Examples of patterns visible in traces but absent from `.learnings/`: - **Retry loops**: The same tool call repeated 3+ times with small variations. The agent eventually got it right but never logged the initial failures. - **Silent user corrections**: The user said "no, that's wrong" mid-flow. The agent corrected course but didn't log the misunderstanding. - **Worked-around test failures**: A test failed, the agent changed approach, the new approach passed, the original failure was forgotten. - **Context handoff causes**: Which drift signals actually triggered handoffs, not just that handoffs happened. - **Token/time anomalies**: Sessions with disproportionate cost vs output — a signal of inefficiency the agent is unaware of. These patterns are high-value for the outer loop because the agent can't self-report them. Session traces are the only source. ### When to trigger --deep mode Trace analysi
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.