curate
Mine transcripts, .agents, bd, and git for skill diffs, bd updates, or rare wiki entries.
What this skill does
# /curate — Canonical Miner Skill
> **Role:** miner. Input = trinity slice (transcripts, `.agents/`, `bd`, `git`). Output = skill diffs (proposed), bd updates, rare wiki entries. **Never mutates code.**
> **Status (2026-05-08):** introduced ADDITIVE in Phase 1 (m6v5.D.1 / soc-78s2v). Existing miners (dream, harvest, forge, compile, retro, post-mortem-mining, flywheel, trace, provenance, defrag) stay until Phase 3 shim conversion (m6v5.D.3). Fix-C smoke (`soc-wb2aa`) gates Phase 3.
## Modes (≤8 per Fix-F mode-flag budget)
| Mode | Purpose | Replaces (post-Phase 3) |
|---|---|---|
| `--mode=dream` | Overnight bounded INGEST→REDUCE→MEASURE on `.agents/` | retired dream lane |
| `--mode=harvest` | Cross-rig promotion + post-mortem mining + flywheel rollup | retired harvest lane, `/post-mortem` mining half, `/flywheel` |
| `--mode=forge` | Per-session transcript mining (SessionEnd cadence) | `/forge` |
| `--mode=compile` | Mine→Grow→Defrag→Lint corpus pipeline | `/compile` |
| `--mode=retro` | Single-session learning capture | retired retro lane |
| `--mode=defrag` | Knowledge defragmentation (overnight) | `compile-session-defrag.sh` hook |
| `--mode=watch` | In-session drift / loop detection (15-min cadence) | `research-loop-detector.sh` hook |
| `--mode=provenance` | Decision-trace + artifact-provenance walk | artifact lineage plus `/trace` |
**Mode-budget assertion:** 8 modes. Adding a 9th requires demoting an existing one OR refusing the addition (per Fix-F § continuous CI gate).
**Anti-goals (hard constraints from architecture):**
- NEVER mutates source code.
- NEVER invokes `/rpi` or any code-mutating flow.
- NEVER performs git operations (no commits, branches, push, rebase, checkout).
- NEVER creates symlinks anywhere.
## Quick Start
```bash
/curate --mode=harvest # cross-rig promotion sweep
/curate --mode=forge # mine the most recent session's transcript
/curate --mode=dream --duration=8h # overnight bounded run
/curate --mode=compile # rebuild .agents/ corpus
/curate --mode=retro # capture this session's learning
/curate --mode=defrag # knowledge defragmentation
/curate --mode=watch # in-session drift check
/curate --mode=provenance --bead=soc-X # walk decision trace for a bead
```
## Execution
### Step 1: Resolve mode + scope
Parse `--mode`. Each mode has its own scope semantics:
| Mode | Reads | Writes | Cadence (typical loop binding) |
|---|---|---|---|
| dream | `.agents/` corpus | `.agents/overnight/<run-id>/` summary + per-iteration JSON | overnight (1×/24h) |
| harvest | `.agents/` across rigs (`~/.agents/learnings/`) | `~/.agents/learnings/` (promotion), `.agents/harvest/latest.json` | daily (1×/24h) |
| forge | session transcripts (`~/.claude/projects/<session>/*.jsonl`) | `.agents/learnings/`, `.agents/patterns/` | per-session (SessionEnd) or 30m loop |
| compile | `.agents/` corpus | `wiki/INDEX.generated.md`, `.agents/compile/<date>.md` | weekly |
| retro | this session's transcript + recent diffs | `.agents/retro/index.jsonl` (append) | per-session (manual) |
| defrag | `.agents/` corpus | `.agents/defrag/<date>.md` (cleanup report) | overnight (1×/24h) |
| watch | last 100 lines of current session transcript | `.agents/watch/<date>.md` (advisory) | in-session 15m loop |
| provenance | `bd` graph + `git log` + `.agents/` for given anchor | `.agents/provenance/<anchor>.md` | on-demand |
### Step 2: Acquire lock (when applicable)
For `--mode=dream`: acquire `.agents/overnight/run.lock` exclusively. If held, exit with "another curator holds the lock" message; do NOT block.
For `--mode=harvest`: check the dream lock. If held, defer harvest to next loop fire.
For `--mode=forge`: per-session lock at `.agents/forge/session-<id>.lock`. Auto-released at end of run.
Other modes: no lock; concurrent invocation is safe.
### Step 3: Run the mode-specific body
Each mode delegates to a body section in this skill (see § per-mode bodies below for outline; full content moves to `references/<mode>.md` at Phase 2 startup).
### Step 4: Produce artifacts
Output is one of (priority order, per architecture knowledge-flywheel rule):
1. **Skill diffs** — proposed changes to existing skill bodies, written to `.agents/skill-diffs/<date>-<skill>.diff`. Operator approves before applying. NEVER writes to `skills/` directly.
2. **bd updates** — `bd note` or new `bd create` for surfaced issues. Direct, no approval queue.
3. **Knowledge entries** — `.agents/research/`, `.agents/learnings/`, `~/.agents/learnings/` (rare; only when knowledge is generally reusable).
### Step 5: Append to LOG.md
Every mode appends one line to `.agents/LOG.md`:
```
2026-MM-DDTHH:MM:SSZ [curate --mode=<mode>] <run-id> — <short-summary> — outputs: <artifact-paths>
```
### Step 6: Report
1. Mode + scope
2. Output path(s)
3. Surfaced bd issues (if any)
4. Loop continuation hint (next-fire cadence per architecture catalog)
## Per-mode bodies (outline)
### --mode=dream
Overnight INGEST → REDUCE → MEASURE iterations until halt:
- INGEST: scan `.agents/` for new artifacts since last run
- REDUCE: dedupe + score + cluster
- MEASURE: compute knowledge-corpus health metrics
- Halt when: wall-clock budget exhausted, plateau (K sub-epsilon deltas), regression beyond per-metric floor, metadata integrity failure
- Knowledge-only; never code mutation
- Output: `.agents/overnight/<run-id>/summary.{json,md}` + per-iteration archive
Detailed body remains inline until Phase 2 extraction.
### --mode=harvest
Cross-rig promotion sweep (folds the retired harvest skill, cp-dxa):
- Walk `.agents/` across all rigs (paths from `~/.agents/rigs.yaml` or fleet config; default roots `~/gt/`)
- Extract learnings/patterns/research artifacts
- Dedupe by content hash (SHA256 after normalization)
- Promote high-confidence items to `~/.agents/learnings/` global hub
- Roll up flywheel-health metrics as byproduct
- Output: `.agents/harvest/latest.json` + promoted files in global hub
**Naming gotcha:** harvest promotes into `~/.agents/learnings/`, NOT `~/.agents/`.
When a user says "harvest all to `~/.agents`" they mean the promotion hub. If they
really want every raw artifact mirrored verbatim (not just the promotion set), that's
`rsync`, not harvest.
Reference CLI (dry-run gate → execute → post-dedup):
```bash
ao harvest --dry-run --quiet # preview scope → .agents/harvest/latest.json
ao harvest --roots ~/gt/ --promote-to ~/.agents/learnings --min-confidence 0.5
ao dedup --merge ~/.agents/learnings/ 2>/dev/null || true # post-harvest cleanup
```
Governance (sweep frequency, size budgets, staleness thresholds, cross-rig synthesis
triggers, dedup policy): [references/harvest-governance.md](references/harvest-governance.md).
Detailed body remains inline until Phase 2 extraction.
### --mode=forge
Per-session transcript mining:
- Locate latest transcript (`~/.claude/projects/<project>/<session>/*.jsonl`)
- Extract knowledge candidates (decisions, patterns, anti-patterns, bug fixes)
- Validate candidates against finding-registry contract
- Queue to `.agents/knowledge/pending/` for curator review
- Output: pending markdown files; bd notes for high-confidence findings
Detailed body remains inline until Phase 2 extraction.
### --mode=compile
Corpus pipeline:
- Mine: extract candidate knowledge from `.agents/`
- Grow: merge into existing taxonomy
- Defrag: collapse redundant entries
- Lint: check for orphans, contradictions, staleness
- Output: `wiki/INDEX.generated.md` (rebuilt), `.agents/compile/<date>.md` (lint report)
Detailed body remains inline until Phase 2 extraction.
### --mode=retro
Single-session learning capture:
- Read last N turns + diff summary
- Identify one durable insight (or none — exit clean)
- Append to `.agents/retro/index.jsonl`
- Optional: surface to bd as note
Detailed body remains inline uRelated 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.